1. Home
  2. Data Science
  3. Python
  4. In Python 3, what does map(str, [1, 2, 3]) return?

Added 2 Nov 2026

In Python 3, what does map(str, [1, 2, 3]) return?

  1. The string '123'
  2. A tuple of strings
  3. The list ['1', '2', '3']
  4. A lazy map iterator Correct answer

Correct answer

D. A lazy map iterator

16 views

MCQSEXAM

Explanation

map() returns an iterator that produces values on demand. Wrap it in list() to see them all. Once consumed, the iterator is exhausted.

Reference

Asked in: NTS, Python Developer Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? 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