vendredi 24 avril 2020

Is it possible to test a bool against 2 variables? [duplicate]

I'm trying to do something like this:

if (a == ("A" or "U")):
 do something

but it only tests against "A" when I introduce the input in the console

but it works if I do this:

if (a == "A" or a == "U")):
 do something

is it possible to achieve the second with a simpler line like the first one? thanks!

Aucun commentaire:

Enregistrer un commentaire