又叫三目表达式
a = 1 b = 2 x = 1 y = a if x else b print(y) # 如果条件表达式x成立,则将if前面的a赋值给y,否则将else后的b值给y
等价为:
a = 1 b = 2 x = 1 if x: y = a else: y = b print(y)