主页
Python
Python 运算符优先级
demo_precedence_or
运行 ❯
×
更改方向
保存代码
更改主题
print(4 or 5 + 10 or 8) """ The or operator has a lower precedence than addition, and we need to calculate the addition first. The calculation above reads: 4 or 15 or 8 = 4 """
4