Menu

If .. elif .. else

Syntax

Help
string:
  - if: [ statement, ... ]
  - then: [ statement, ... ]
  - elif: [ statement, ... ]
  - then: [ statement, ... ]
  - else: [ statement, ... ]

Conditions

if followed by then is a way of saying:
"if this statement is true, then execute this statement".

elif followed by then is a way of saying:
"else if this statement is true, then execute this statement".

else is a way of saying:
"if the previous statements weren't true, then execute this statement".

Menu