Python Arena

Module 8

Combining conditions

Conditions made of several parts: and, or and not, how Python groups them when they're mixed, the short way to check a range with a chained comparison, and conditional statements nested inside each other.

Steps

  1. Both at once: and
  2. At least one: or
  3. Turning a condition around: not
  4. Ranges and longer conditions
  5. Conditions inside conditions