a = 1
if a == (1 or 2): print(1)
if a == (2 or 1): print(2)
if a == 1 or 2: print(3)
if a == 2 or 1: print(4)
python only prints 1,3,4
what is the difference between "(1 or 2)" and "1 or 2"
Aucun commentaire:
Enregistrer un commentaire