摘要:
and 判断非Boolean类型数据会自动转换类型 "A" and "B" → "B" 因为表达式 A 和 B都为True所以返回 "B" "A" is True → False 因为这里判断的"A": str类型,而True为Boolean类型所以不相等 bool("A") is True → T 阅读全文
posted @ 2020-06-07 09:43 SJ- 阅读(2498) 评论(0) 推荐(0)
|
||
|
摘要:
and 判断非Boolean类型数据会自动转换类型 "A" and "B" → "B" 因为表达式 A 和 B都为True所以返回 "B" "A" is True → False 因为这里判断的"A": str类型,而True为Boolean类型所以不相等 bool("A") is True → T 阅读全文
posted @ 2020-06-07 09:43 SJ- 阅读(2498) 评论(0) 推荐(0) |
||