0

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.

YellowPillow
  • 3,680
  • 5
  • 29
  • 53

1 Answers1

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,062
  • 1
  • 7
  • 15