Skip to content

Instantly share code, notes, and snippets.

@pointofpresence
Last active March 31, 2024 18:58
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 pointofpresence/fd5df3f9b2490e4b2c5691d5d262697e to your computer and use it in GitHub Desktop.
Save pointofpresence/fd5df3f9b2490e4b2c5691d5d262697e to your computer and use it in GitHub Desktop.
Slicing in python
a[start:stop] # items start through stop-1
a[start:] # items start through the rest of the array
a[:stop] # items from the beginning through stop-1
a[:] # a copy of the whole array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment