🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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))
  1. A.True False
  2. B.False True
  3. C.True True
  4. 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 →