Python学习笔记之疑问 8:Python 中的问号表达式

用List实现Python里的?:条件表达式

>>> [1,2][1==0]
1
>>> [1,2][1<>0]
2

posted @ 2013-10-06 11:27  不喝啤酒的小啤酒  阅读(645)  评论(0)    收藏  举报