标签:python学习 als 解析 pytho and 学习 python 根据 判断
短路原则
对于and 如果条件1为假,and后面的条件短路,不用判断一定为假
对于or,如果条件1为真,or 后面的条件短路,不用判断一定为真
not not true or false and not true
true
not not true为真,or的短路原则(false and not true)被短路
true or true and false
true
解析:true 为ture,根据or 短路原则,true and false被短路不计算就是true
标签:python学习 als 解析 pytho and 学习 python 根据 判断
原文地址:https://www.cnblogs.com/wangyunpeng888888/p/12855648.html