Guest User

Untitled

a guest
Jan 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. In [1]: a = ([], 2, 3, 4)
  2.  
  3. In [2]: a
  4. Out[2]: ([], 2, 3, 4)
  5.  
  6. In [3]: a[0] += ["How did I get here?"]
  7. ---------------------------------------------------------------------------
  8. TypeError Traceback (most recent call last)
  9.  
  10. <ipython console> in <module>()
  11.  
  12. TypeError: 'tuple' object does not support item assignment
  13.  
  14. In [4]: a
  15. Out[4]: (['How did I get here?'], 2, 3, 4)
Add Comment
Please, Sign In to add comment