Skip to content

Instantly share code, notes, and snippets.

@AdamGold
Created March 9, 2019 16:28
Show Gist options
  • Save AdamGold/7d9563a4f194f01e4d9b43d0cf9f02d0 to your computer and use it in GitHub Desktop.
Save AdamGold/7d9563a4f194f01e4d9b43d0cf9f02d0 to your computer and use it in GitHub Desktop.
In [22]: t = (1, 2, [3, 4])
In [23]: t[2] += [30, 40]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-25-af836a8d44a2> in <module>
----> 1 t[2] += [30, 40]
TypeError: 'tuple' object does not support item assignment
In [24]: t
Out[24]: (1, 2, [3, 4, 30, 40])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment