def a(b):
b = b + [5]
c = [1, 2, 3, 4]
a(c)
print(len(c))
- 4
- 5
- first
- An exception occurs
def change(i):
i=i+1
return i
change(1)
print(i)
def a(b):
b = b + [5]
c = [1, 2, 3, 4]
a(c)
print(len(c))
a=10
b=20
def change():
global b
a=45
b=56
change()
print(a)
print(b)
def change(i = 1, j = 2):
i = i + j
j = j + 1
print(i, j)
change(j = 1, i = 2)
def change(one, *two):
print(type(two))
change(1,2,3,4)
def display(b, n):
while n > 0:
print(b,end="")
n=n-1
display('z',3)
def find(a, **b):
print(type(b))
find('letters',A='1',B='2')
x = 2
def vidu():
global x
y = "Biến cục bộ"
x = x * 2
print(x)
print(y)
vidu()
Local variable
4