为什么10和5在Python中返回5,而5和10在python中返回10?基本上,它返回第二个int和运算符,而不管值>>

问题描述 投票:0回答:1

我正在研究python“ and”运算符,发现:10和5出:55和10出:10

Output image for refference :

我正在研究python“ and”运算符,发现:10和5 out:5 5和10 out:10输出图像以供参考:

python operator-keyword and-operator
1个回答
0
投票

考虑语句逻辑以及哪个操作数确定整个表达式的值:

© www.soinside.com 2019 - 2024. All rights reserved.