Skip to content

Instantly share code, notes, and snippets.

@slingam00
Last active May 22, 2020 02:06
Show Gist options
  • Save slingam00/5162b4a549c38ac83bdb2e3afaf18d96 to your computer and use it in GitHub Desktop.
Save slingam00/5162b4a549c38ac83bdb2e3afaf18d96 to your computer and use it in GitHub Desktop.
myTuple1 = (1, 2, 3, 4, 5)
myTuple2 = ('a', 1, 'b', 2, 'c', 3')
# Indexing
print(myTuple1[2]) # Result is 3
# Range Indexing
print(myTuple1[2:4]) # Result is (3, 4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment