Python In-place swapping of two numbers

Last updated 2 years, 10 months ago | 1021 views 75     5

Tags:- Python Django

 Python | In-place swapping of two numbers

>>> a, b = 10, 20
>>> print(a, b)
10 20

>>> a, b = b, a
>>> print(a, b)
20 10