一、简单逻辑
if condition1:
statement1
else:
statement2
二、多条件逻辑
if condition1:
statement1
elif condition2:
statement2
...
elif conditionN:
statementN
else:
statement
三、三元运算
[on_true] if [expression] else [on_false]
if condition1:
statement1
else:
statement2
if condition1:
statement1
elif condition2:
statement2
...
elif conditionN:
statementN
else:
statement
[on_true] if [expression] else [on_false]