0
Can someone explain me the solution of this question?
x,y=20,60 y,x,y=x,y-10,x+10 print(x,y)
3 odpowiedzi
+ 1
im not sure but i think its preloading the variables, and so it goes this way:
x=20
y=60
y=(preloaded x) 20
x =(preloaded y) 60-10
y =(preloaded x) 20 + 10
0
Why it is taking preloaded values of x and y . As the value changed in the second line . So in memory also the value should change?
0
a, b, *c, d = [1, 2, 3, 4, 5, 6, 7, 8, 9]
print(a)
print(b)
print(c)
print(d)
As you can see here, it needs to be preloaded so it nows how many numbers are left for c*
And I think that's the same as in your code, as soon as a code line is started its preloading everything
Sorry don't know how to describe it better xD