+ 1
Swap the value in one line
a=10 or b= 20
3 ответов
+ 7
Not sure I understand the question.
Do you mean like:
a = 10
b = 20
a, b = b, a
print("a =", a) # a = 20
print("b =", b) # b = 10
+ 3
https://www.sololearn.com/post/9223/?ref=app
variable swapping
+ 1
a,b=b,a