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 #94
my_list = []
print(bool(my_list))
As the list object implements a __len__() method that returns zero when called with the object, an empty list is considered False . (docs.python.org/3/library/stdtypes.html#truth-value-testing)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) October 5, 2020
my_list = []
print(bool(my_list))
True
False#python #python3 #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: