Swapping first and second place

Predict the output · Basic · §3.6, §10.1 Readable code

These two pieces of code try to swap first and second place in a ranking by likes. Predict the output without running the code.

Code

top = "sora"
second = "mina"
top = second
second = top
print(top, second)

top = "sora"
second = "mina"
top, second = second, top
print(top, second)

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.