This thing can be easily achieved in Python which in other languages usually require 3-4 lines. This is possible due to Python’s tuple data structure. So to interchange values of two variables ‘x’ and ‘y’ simply use -
x, y = y, x
“x, y” defines a new tuple which takes the values of old variables which are presented in the form of another tuple as “y, x”.