三元运算符 c = a if a>b else b

def my(a,b):
c = a if a>b else b
return c

d = my(1,12)
print(d)
原文地址:https://www.cnblogs.com/jack20181017/p/9892338.html