Skip to content
Onsite

Output: t = ([1],) then t[0] += [2]

MediumP3Output

What does this code print?

1t = ([1],)
2try:
3 t[0] += [2]
4except TypeError as e:
5 print('TypeError:', e)
6print(t)
Saved automatically

One line per print, as Python prints it. An uncaught exception as its last traceback line, for example ZeroDivisionError: division by zero.

Hints

Saved automatically