Python - Control flow (Comparator, Boolean Operator and Conditional Statement)

About

Operator

Comparators

  • Equal to (==)
  • Not equal to (!=)
  • Less than (<)
  • Less than or equal to (<=)
  • Greater than (>)
  • Greater than or equal to (>=)
  • In (for a string or a list)

<wrap information>== is used to compare whether two things are equal, and = is used to assign a value to a variable.</note>

Comparisons generate (one of two)?? results: True or False

variable_true  = 1 <= 2
variable_false = 1 == 2

Flow Statement


Powered by ComboStrap