Skip to main content
 首页 » 编程设计

python之Python 中数字之间的 AND/OR 运算符

2025年05月04日21lhb25

<分区>

and/or 运算符如何在数字(甚至字符串)之间工作?

5 and 7  # this returns 7 
7 and 5  # this returns 5 
21 and 4 # this returns 4 
4 and 21 # this returns 21 

和运算符在这种情况下如何工作?