Skip to content

Instantly share code, notes, and snippets.

@niranjrajasekaran
Last active May 11, 2019 16:15
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 niranjrajasekaran/539595ae197b67a0dbee03a4b482ea78 to your computer and use it in GitHub Desktop.
Save niranjrajasekaran/539595ae197b67a0dbee03a4b482ea78 to your computer and use it in GitHub Desktop.
Basic implementation of python tuples
In [1]: t = (1, 2, 3, 4)
In [2]: t[0]
Out[2]: 1
In [3]: t[0] = 10
TypeError Traceback (most recent call last)
<ipython-input-4-88963aa635fa> in <module>()
1 t[0] = 10
TypeError: 'tuple' object does not support item assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment