python三元(三目)运算

传统的if,else写法

三元运算

name="alex" if 1==1 else "SB"

posted @ 2017-02-21 09:51  爆烈鼓手  阅读(211)  评论(0)    收藏  举报