title: How swapping variables is implemented in Python?
body: <p>How does the below code work in Python:</p>
  
  <pre><code>a = input()
  b = input()
  a, b = b, a  # STATEMENT 1
  print(a, b)
  </code></pre>
  
  <p>Does the statement 1 create a third variable in Python heap memory space to swap the two numbers or does it use some algorithm to do the swap?</p>