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

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

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

原文地址:https://www.cnblogs.com/littleebeer/p/3353456.html