What is the output of the following code ?
p = {0: 'x', 1: 'y', 2: 'z'} for i in p.items(): print(i)
0 1 2
x y z
(0, 'x') (1, 'y') (2, 'z')
None None None
p.items() results in dict_items([(0, 'x'), (1, 'y'), (2, 'z')])
For each iteration i will be assigned to tuples (0, 'x') (1, 'y') and (2, 'z')
Comment here: