Python基础-三元运算

示例:

result =value1 if 条件 else value2
原文地址:https://www.cnblogs.com/chiang97912/p/7233469.html