Swap Two Values
Completed
Read two lines into a and b. Swap them in one line with tuple unpacking, then print a and b on separate lines.
Input
Two lines of text.
Output
The second line, then the first line.
Example
Input
left right
Output
right left
Editor
Python
Hints
a, b = b, a swaps the values without a temporary variable.
Solution explanation
The right side b, a is built first as a tuple, then unpacked into a and b.
Show solution
a = input()
b = input()
a, b = b, a
print(a)
print(b)