I would like to have an if statement where the match is one of several numbers without using a large number of |
bars because I have many matching cases
if number == 1 | number == 5 | number == 7
do stuff
In R, there is the operand %in% that works sort of like the following:
if number %in% [1,5,7]
do stuff
Is there a similar operand/ability in python?
Thanks