- 2
Hi guys. need a help(
Fill in the blanks to swap the variable values with one single statement. a = 7 b = 42 a ... b = ... , ...
8 Antworten
+ 4
What is your try..? It's explain in lesson.. complete lesson or read again..
Python allows assigning with camma (,) separated ex: a,b=7,42
+ 1
Andrey Zinin
Maybe there is a bug in the quiz, but here you see that it works:
https://code.sololearn.com/ceTdSRcavozh/?ref=app
0
if you mean this
0
It works . Check this code
a=7
b=42
a,b=b,a
print(a,b)
0
ok, it is work in ide but in quiz it is does't
0
i'l try anything. I don't understand why it is not working
0
How many empty slots there ..? I think only way : a ,b = b, a
If not work then it may be a bug..
- 1
a, b = b,a does not work