1. Home
  2. Data Science
  3. Python
  4. What is the output of print(list(map(lambda x: x * x, [1…

Added 25 Nov 2026

What is the output of print(list(map(lambda x: x * x, [1, 2, 3]))) in Python?

print(list(map(lambda x: x * x, [1, 2, 3])))
  1. [1, 4, 9] Correct answer
  2. [1, 2, 3]
  3. [2, 4, 6]
  4. <map object>

Correct answer

A. [1, 4, 9]

6 views

MCQSEXAM

Explanation

map() applies a function to every item; list() consumes the iterator.

Reference

Asked in: Python Interview Functions

https://docs.python.org/3/tutorial/controlflow.html#defining-functions

Preparing for an exam?

Doubts & discussion

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