Generally, there are two variations of writing repeated if conditions that I know of:
- Simple
if x != <something> and x != <somethingElse> and x != <somethingElse +>:
- Little compact
if all(x != el for el in [<something>, <somethingElse>, <somethingElse +>]
Is there a more compact way?