def append_zero(items): # this mutates the caller's list items.append(0) nums = [1, 2, 3] append_zero(nums) print(nums)
a function can mutate a passed mutable object