Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save OpnSrcConstruction/b15b39b9c4199eb5ce49f799f68a7b78 to your computer and use it in GitHub Desktop.
Save OpnSrcConstruction/b15b39b9c4199eb5ce49f799f68a7b78 to your computer and use it in GitHub Desktop.
Python example: tuple basics #python #tuple
'''
@author: OpnSrcConstruction
'''
tuple_1 = ('Joe', 'Pam', 1998, 2018)
tuple_2 = (1, 2, 3, 4, 5, 6, 7, 8, 9)
print("tuple_1[0]: ", tuple_1[0])
print("tuple_2[1:6]: ", tuple_2[2:4])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment