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

 

 




value = 1 if flag else 0