← Quiz: Python Variables and Data Types: all 15 questions
Quiz: Python Variables and Data Types · Question 13 of 15
What does this print? (code)
What does this print?
print(bool([]), bool([0]), bool(" "))
- A.False False False
- B.True True True
- C.False True True
- D.False False True
Answer & explanation
Correct answer: False True True
An empty list is falsy. A list with one item (even 0) and a string with a space are not empty, so they are truthy.
Can you get the rest right without peeking?
Take the timed Quiz: Python Variables and Data Types quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →