0

What does this mean in Python?

x,y=y,x

29th Apr 2019, 10:01 AM
Kelly
Kelly - avatar
3 Respostas
+ 6
it means that x gets the value of y and y gets the value of x.
29th Apr 2019, 10:03 AM
HonFu
HonFu - avatar
+ 3
Switching two variables. You can also assign values to multiple variables: a=2 b=3 c=5 Is equivalent to: a, b, c = 2, 3, 5
29th Apr 2019, 10:04 AM
Aymane Boukrouh
Aymane Boukrouh - avatar