samedi 11 avril 2020

Random increment in python

a beginner here, how do i phrase it in python, "in case of a tie,randomly increment one of the two elements?"? from python i get SyntaxError: can't assign to function call. any assistance you can provide would be greatly appreciated.

if pl1_vote == 2 and pl2_vote == 2:
    random.sample(pl1_vote, pl2_vote) += 1



Aucun commentaire:

Enregistrer un commentaire