title: How do you return multiple variables from a function in python
body: <p>I am creating a game that is played in the terminal and I wanted to reduce the amount of repetitive code by using functions eg</p>
  <pre><code>def p1_end_turn(p1_turn, p2_turn):
      p1_turn = False
      p2_turn= True
      return p1_turn, p2_turn
  </code></pre>
  <p>however when running the program with the code <code>p1_end_turn(p1_turn, p2_turn)</code> the variable p1_turn and p2_turn have not been changed. How can I make this code properly return the variables
  (im using python3.9.1 and have checked that the function works properly)</p>