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

> Procedural Languages > Python > Python - Grammar (Package | Module)

1 - About

3 - Operator

4 - 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)

== is used to compare whether two things are equal, and = is used to assign a value to a variable.

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

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

5 - Flow Statement

lang/python/grammar/flow.txt · Last modified: 2019/09/10 09:29 by gerardnico