Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 465 Bytes

File metadata and controls

21 lines (16 loc) · 465 Bytes

Handling conditions

Conditional execution can be completed using the if statement

if syntax

if expression:
    # code to execute
else:
    # code to execute

Comparison operators

  • < less than
  • > greater than
  • == is equal to
  • >= greater than or equal to
  • <= less than or equal to
  • != not equal to