I am trying to write an if statement that checks multiple values without writing out a bunch of full statements.
Is it possible to get something like this to work:
a = 7
if a == (30 or 7):
print(1)
Instead of:
a = 7
if (a == 30) or (a == 7):
print(1)
Aucun commentaire:
Enregistrer un commentaire