逻辑运算符:or and not 优先级:()>not>and>or 举例子: Print(2>1 and 1<4 or 2<3 and 9>6 or 2<4 and 3<2 ) 根据优先级,有优先的先算优先,相同优先级的从左往右计算。所以上面的为: 2>1 and 1<4 = true 2<3 and 9>6 =true 2<4 and 3<2 = false 所以变为: true or true or false = true
posted on 2018-08-22 11:09 lgf01010 阅读(738) 评论(0) 编辑 收藏 举报