I want to do something if "val" is "a" or "as" or "asd" I write this:
if val == "a" or val == "as" or val == "asd":
print("aaa")
but, is there any way to whrite "val" once?, like this:
if val == "a" or "as" or "asd":
print("aaa")
if I write that, the "if", always is true:
val=123
if val == "a" or "as" or "asd":
print("aaa")
and the console print "aaa"
and if I write this:
val="as"
if val == ("a" or "as" or "asd"):
print("aaa")
the console print nothing the if is true only if val == "a", the first
I do not want to write "val==" for each of the possible 1000 outcomes of "val"...