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
def p1_end_turn(p1_turn, p2_turn):
p1_turn = False
p2_turn= True
return p1_turn, p2_turn
however when running the program with the code p1_end_turn(p1_turn, p2_turn)
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)