Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In [1]: a = ([], 2, 3, 4)
- In [2]: a
- Out[2]: ([], 2, 3, 4)
- In [3]: a[0] += ["How did I get here?"]
- ---------------------------------------------------------------------------
- TypeError Traceback (most recent call last)
- <ipython console> in <module>()
- TypeError: 'tuple' object does not support item assignment
- In [4]: a
- Out[4]: (['How did I get here?'], 2, 3, 4)
Add Comment
Please, Sign In to add comment