python中的3目运算(3元表达式)

js中

ret  = 1 == 1 ? 'true' : 'false'

python中

ret = 'true' if 1==1 else 'false'
原文地址:https://www.cnblogs.com/412013cl/p/8436548.html