What is the output of `bool([])`?

Python Developer Easy

Python Developer — Easy

What is the output of `bool([])`?

Key points

  • Empty lists are considered falsy in Python.
  • The `bool()` function converts values to boolean.
  • In this case, an empty list evaluates to False.
  • Remember that non-empty lists would evaluate to True.

Ready to go further?

Related questions