How could I transform this code to use one function and use a different variable depending on which variable is passed through when the function is called?
def p1win():
p1cards.append(play1card)
p1cards.append(play2card)
def p2win():
p2cards.append(play1card)
p2cards.append(play2card)
Any help would be greatly appreciated, thanks