三元表达式--python

a = 1
b = 2

h = "变量1" if (a>b |(a<b) | (in) | (等等等) |) else "变量2"
print(h)
原文地址:https://www.cnblogs.com/zjldeboke/p/12763668.html