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

js中

1

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

python中

1

ret = 'true' if 1==1 else 'false'

猜你喜欢

转载自blog.csdn.net/ieeso/article/details/81672453
今日推荐