使用 值 if 条件 else 另一个值 可简化语法形式


value = 1 if flag else 0
如果觉得文章不错,可以分享给其他人哟~
原文地址:https://www.cnblogs.com/hany-postq473111315/p/15359273.html