lundi 14 novembre 2016

how can i use for this from with python not equal?

I have this code, but fail. I want different value.

For example;

0, 1, 2 = yes

1, 2, 0 = yes

0, 1, 1 = fail

1, 1, 1 = fail

import random
def numberValue():
    a1 = random.randrange(0,3)
    a2 = random.randrange(0,3)
    a3 = random.randrange(0,3)
    a1 != a2 != a3 # How can use this?
    print "Value: ", a1, ",", a2, ",", a3
numberValue()




Aucun commentaire:

Enregistrer un commentaire