Solution
A regular if-else statement is written over several lines. One block of code runs if the condition is true, and another block runs if the condition is false:
PYTHON
if condition:
# code to run if the condition is true
else:
# code to run if the condition is false
A short-hand if-else statement is written in a single line:
PYTHON
action_if_true if condition else action_if_false
The short-hand form is useful for simple choices, such as assigning a value to a variable. The regular form is clearer when each branch contains several statements.