python三元(三目)运算

传统的if,else写法

三元运算

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

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