Fra*_*eau 2 python operators python-3.x
我在 Python 中发现了一些非常奇怪的行为。我的一位学生在尝试查找属于两个列表的元素时犯了某种错误,他写道:
list1 and list2
Run Code Online (Sandbox Code Playgroud)
奇怪的行为是 Python 3 没有触发任何错误!
list1 and list2实际上有一个值为list2。
这有什么已知的原因吗?
| 归档时间: |
|
| 查看次数: |
571 次 |
| 最近记录: |