1. Home
  2. Data Science
  3. Python
  4. What is the result of np.array([1, 2, 3]) * 2 in Python?

Added 25 Nov 2026

What is the result of np.array([1, 2, 3]) * 2 in Python?

  1. array([1, 2, 3, 1, 2, 3])
  2. array([2, 4, 6]) Correct answer
  3. 6
  4. Error

Correct answer

B. array([2, 4, 6])

6 views

MCQSEXAM

Explanation

NumPy multiplies element-wise, unlike a list which repeats.

Reference

Asked in: Python Interview Data Libraries

https://docs.python.org/3/library/index.html

Preparing for an exam?

Doubts & discussion

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