x = (4, 6, 8) print x (4, 6, 8) print type(x) y = 9, 3, 6 print type(y) print y (9, 3, 6) print x[1] 6 y[0] = 2 Traceback (most recent call last): File "C:\Users\Susan\AppData\Local\Enthought\Canopy\App\appdata\canopy-2.1.3.3542.win-x86_64\lib\site-packages\IPython\core\interactiveshell.py", line 2885, 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[0].remove(5) z[0].remove(4) print z ([12], [7, 8]) z[0].remove(12) print z ([], [7, 8]) v,w = 8,3 print v 8 print w 3 (v,w) = (5,6) print v 5 print w 6 w = "oh no winter is coming" w = w.split() print w ['oh', 'no', 'winter', 'is', 'coming'] for (index,name) in enumerate(w): print index,name 0 oh 1 no 2 winter 3 is 4 coming for x in enumerate(w): print type(x), x (0, 'oh') (1, 'no') (2, 'winter') (3, 'is') (4, 'coming') print enumerate(w)