python 布尔值
布尔值
s = user=='alex' and pwd== "12" or 1==1 and pwd =="pwd" s = user=='alex' and pwd== "12" or 1==1 s = not False 补充 先计算括号内 执行顺序 从前到后 结果 True OR ==> True True AND ==> 继续走 False OR ==> 继续走 False AND ==> False user == 'alex' and (pwd == '123' or 1 == 1) user = 'alex pwd = '123 user == 'alex' and pwd == '123' or 1 ==1 and pwd == ''7689

浙公网安备 33010602011771号