1. Home
  2. Data Science
  3. Python
  4. What does any([0, '', None, 5]) return?

Added 2 Nov 2026

What does any([0, '', None, 5]) return?

  1. False
  2. 5
  3. True Correct answer
  4. None

Correct answer

C. True

18 views

MCQSEXAM

Explanation

any() returns True if at least one element is truthy. 0, '' and None are falsy, but 5 is truthy. all() would return False here.

Reference

Asked in: NTS, Python Developer Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs