Conditions

Conditions in Python follow more of an English language approach:

  • && is and.

  • || is or.

  • in can be used to check if a specified object is within a container.

  • not inverts booleans.

  • You could also use is eg:

if statement is true:
  • == matches values.

  • is matches instances.