def f1(thing: list) -> None:
thing += ['x', 1]
def f2(thing: list) -> None:
thing = thing + ['x', 1]
phone = [9]
f2(phone)
print(phone)
f1(phone)
print(f2)
The outputs are [9] for the first print statement and [9, 'x', 1] for the second one. Can anybody explain this occurrence?