title: Swapping variables in python with a function
body: <p>I need to write a program whose input is two integers and whose output is the two integers swapped.</p>
  <p>If input is: <code>3 8</code>, output is <code>8 3</code>.</p>
  <p>The program must define and call the following function. <code>swap_values()</code> returns the two values in swapped order.
  <code>def swap_values(user_val1, user_val2)</code></p>
  <p>so far I have:</p>
  <pre><code>def swap_values(user_val1, user_val2):
      return user_val2, user_val1
  
  user_val1 = int(input())
  user_val2 = int(input())
  swap_values(user_val1, user_val2)
  
  print (swap_values(user_val1, user_val2))
  </code></pre>
  <p>but that produces <code>(8, 3)</code> and also doesn't work with a function call like <code>swap_values(-1, 10)</code>.</p>
  <p>So I'm wondering what I would need to do to get <code>8 3</code> for the input and then <code>10 -1</code> for the function call.</p>