Question #311

What is the output of the code snippet below?
a = 1
b = 2
b, a = a, b

An application of unpacking in Python is swapping values between variables without using a temporary or auxiliary variable. In this case, b receives the value of a e.g. 1 . (

Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵

Similar questions: