A function tries to add one to the first item of a tuple. If that fails, it builds a new tuple instead.
def bump(t):
try:
t[0] += 1
except TypeError:
t = (t[0] + 1,) + t[1:]
return t
p = (1, 2)
q = bump(p)
print(p, q, p is q)
What does the program print?