Hey all so I was reading through the documentation for Python and it states that any empty string, list, dictionaries, I think they are called objects I think?(I don't really understand the concept of objects :\ if someone would be able to explain it to me I would be happy). Anyways my question is x = []; bool(x) # False
so therefore: shouldn't bool(x==False)
be true? But it returns false and that's the part that I am confused about.
Asked
Active
Viewed 418 times
0

YellowPillow
- 4,100
- 6
- 31
- 57
1 Answers
0
x
is an empty array. If you convert an empty array to a boolean, you get False
; but that doesn't mean that x
is the same thing as False
.

Ricky Stewart
- 1,102
- 1
- 8
- 18