python 三元运算符

print (1==2) and 12 or 4

b=12 if 1==2 else 4
print(b)

原文地址:https://www.cnblogs.com/howhy/p/6008507.html