result = 值1 if 条件 else 值2 如果条件为真:result = 值1如果条件为假:result = 值2 转载于:https://www.cnblogs.com/zoe233/p/6999417.html