examples/functions/reference_passed.py
from __future__ import print_function

numbers = [1, 2, 3]

def update(x):
    x[0] = 23

def change(y):
    y = [5, 6]
    return y

print(numbers)         # [1, 2, 3]

update(numbers)
print(numbers)         # [23, 2, 3]

print(change(numbers)) # [5, 6]
print(numbers)         # [23, 2, 3]