+ 3

changing value

a=10; b=20 not using new variable and changing a and b's value the result should be print(a,b) => 20 10

13th Mar 2018, 2:06 PM
조예진
조예진 - avatar
4 ответов
+ 14
a, b = b, a
13th Mar 2018, 2:37 PM
Hatsy Rei
Hatsy Rei - avatar
+ 2
Swap parameters in the print function: print(b,a) =>20 10
13th Mar 2018, 2:11 PM
HBhZ_C
HBhZ_C - avatar
+ 2
>>> a, b = 10, 20 >>> print((a, b)[::-1]) (20, 10)
13th Mar 2018, 7:47 PM
ƒred
ƒred - avatar