[dywang@deyu zzz]$ cat tuple2.py #!/usr/bin/python3 # coding: utf-8 listx = [ 32, 12, 'abc' ] tuplex = ( 32, 12, 'abc' ) listx[1] = 10 tuplex[1] = 10
[dywang@deyu zzz]$ ./tuple2.py
Traceback (most recent call last):
File "./tuple2.py", line 7, in <module>
tuplex[1] = 10
TypeError: 'tuple' object does not support item assignment