Assume that a = 1 and b = 2. What is a and b after the following statement?
a, b = b, a
Python code:
a=1
b=2
a,b = b,a
print("a value after the statement:", a)
print("b value after the statement:",b)
Values after the statement:
Python 3.2.1 (default, Jul 10 2011, 21:51:15) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
a value after the statement: 2
b value after the statement: 1
>>>