小编ric*_*boy的帖子

Why does this boolean expression evaluate to False?

Can someone explain to me why the Python interpreter evaluates this expression to be False?

1 in [1] == True
Run Code Online (Sandbox Code Playgroud)

I would expect that 1 in [1] would evaluate to True, and obviously True == True would be True. However this isn't what happens - the expression is False. Why does this happen?

python

4
推荐指数
1
解决办法
71
查看次数

标签 统计

python ×1