python how to draw a variable again if it is the same as another variable
I have two lists, basically the same number
import random
A = [ 0, 10, 20, 30, 40 ]
B = [ 0, 10, 20, 30, 40 ]
drawA =(random.choice(A))
drawB =(random.choice(B)) # want to exclude the number drawn in drawA
How can I ask python to draw again if drawB = drawA or simply how I can draw a number from list B excluding the number already drawn in list A.
Aucun commentaire:
Enregistrer un commentaire