Skip to content

Instantly share code, notes, and snippets.

@Celia-code
Created May 1, 2020 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Celia-code/f17ee638debb9a20d7229d95e108f847 to your computer and use it in GitHub Desktop.
Save Celia-code/f17ee638debb9a20d7229d95e108f847 to your computer and use it in GitHub Desktop.
列表
a = [1, 2, 3, 4, 5, 6]
print(a[0:3])
print(a[0:6:2])
#打印出
#[1, 2, 3]
#[1, 3, 5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment