These are the two examples, could someone help me by explaining?
Example 1
v1=list(range(5))
v1temp=v1
v2=1
def ext(x,y):
return x.append(y)
ext(v1,v2)
print(v1temp)
Example 2
a=1
b=2
atemp=a
a=b
print(atemp)
These are the two examples, could someone help me by explaining?
Example 1
v1=list(range(5))
v1temp=v1
v2=1
def ext(x,y):
return x.append(y)
ext(v1,v2)
print(v1temp)
Example 2
a=1
b=2
atemp=a
a=b
print(atemp)