The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #807
print(bool('False'))
print(bool())
If the argument passed to the bool() function does not amount to zero, it returns True . Otherwise, it always returns False . (w3schools.com/python/python_booleans.asp)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) April 8, 2021
print(bool('False'))
print(bool())
True
True
False
True
True
False
None
None
π Comment the answer, like and retweet! #python
Question difficulty: π΅π΅π΅π΅π΅