标签:
(1) variable = a if exper else b (2)variable = (exper and [b] or [c])[0] (2) variable = exper and b or c
[python]python三元表达式另类实现方式
原文地址:http://www.cnblogs.com/fantasy01/p/4569352.html