Question #875

What is the output of the code snippet below?
print(bool([]) * True)

In Python, the boolean True evaluates to 1. Also, the boolean() function returns False is an empty list is passed to it. As such, bool([]) * True will return 0. (

Comment on Disqus:

Comment on Twitter:

Question difficulty: 🔵🔵🔵🔵🔵

Similar questions: