console morning Oct 21, 2014 x = (4, 5, 6) print x (4, 5, 6) y = 9, 5, 6 print y (9, 5, 6) type(y) Out[6]: tuple print x[1] 5 print y[1] 5 y[0] = 2 Traceback (most recent call last): File "C:\Users\Susan\AppData\Local\Enthought\Canopy\User\lib\site-packages\IPython\core\interactiveshell.py", line 2883, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in y[0] = 2 TypeError: 'tuple' object does not support item assignment z = ([5,6],[7,8]) print z ([5, 6], [7, 8]) type(z) Out[12]: tuple z[0][1] = 12 print z ([5, 12], [7, 8]) z[0].append(4) print z ([5, 12, 4], [7, 8]) z.append(6) Traceback (most recent call last): File "C:\Users\Susan\AppData\Local\Enthought\Canopy\User\lib\site-packages\IPython\core\interactiveshell.py", line 2883, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in z.append(6) AttributeError: 'tuple' object has no attribute 'append' print z ([5, 12, 4], [7, 8]) z[0].remove(5) z[0].remove(12) z[0].remove(4) print print z ([], [7, 8])