F Семантіка Python

a = 2
b = a
b
## 2
a = 3
b
## 2
def append_element(x, element):
    x.append(element)
data = [1, 2, 3]
append_element(data, 4)
data
## [1, 2, 3, 4]
def f(x):
    x.append(3)
    return(x)

a = [1, 2]


f(a)
## [1, 2, 3]
print(a)
## [1, 2, 3]