If...
statementhello
is contained in the string helloworld
, then output it's in the string!
" "hello" in "helloworld"
is True
, the next lineprint("it's in the string!")
is executed.If...else
statementelse:
to execute an alternate outcome (e.g. if the condition is not met)if
statement finds out if the temperature is between the value 10 to 20, which is described by "larger than 10 and smaller than 20".If...elif...else
statementelif
conditions as you like. Note that in this case else
statement is a "catch all" condition; if all the elif
conditions are NOT met, then execute the else
statement.