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

js中

 
ret  = 1 == 1 'true' 'false'

python中

 
ret = 'true' if 1==1 else 'false'
原文地址:https://www.cnblogs.com/sea-stream/p/10422404.html