Python:NOT of a Condition

From Progzoo
Jump to navigation Jump to search

There are several logical operators:

and
or
not

We can invert a condition using not

(Note: In this particular case, when not is used with the in operator, we could also write if "a" not in name for convenience.)

Which countries do not have an "a" in the name.

[Font] [Default] [Show] [Resize] [History] [Profile]