Python 三目运算符

 cookbook 中有

 等价于

 解释:如果tail 存在 ture 返回 head +sum(tail),否则返回 head

原文地址:https://www.cnblogs.com/jescs/p/11866226.html