三元运算符:{表达式为真的返回值} if {表达式} else {表达式为假的返回值}
def small(a, b, c):
return a if (a < b and a < c)else (b if (b < a and b < c) else c)
print(small(10, 32, 3))
------------------------
#3
info = [x**2 if (x > 5) else x**4 for x in range(1, 10)]
print(info)
--------------------------
[1, 16, 81, 256, 625, 36, 49, 64, 81]