python 3元运算符

 

>>> 1 if(1) else 6
1
>>> 1 if(0) else 6
6
>>> 

 

posted @ 2019-05-02 00:38  anobscureretreat  阅读(406)  评论(0编辑  收藏  举报