← Quiz: Comprehensions and Lambda: all 15 questions
Quiz: Comprehensions and Lambda · Question 12 of 15
What does this print? (code)
What does this print?
marks = [55, 72, 38, 90]
print(any(m < 40 for m in marks), all(m >= 40 for m in marks))
- A.True False
- B.False True
- C.True True
- D.False False
Answer & explanation
Correct answer: True False
38 is below 40, so any() is True, and for the same reason all() is False.
Can you get the rest right without peeking?
Take the timed Quiz: Comprehensions and Lambda quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →