1. Home
  2. Data Science
  3. Python
  4. What does np.arange(0, 10, 2) produce in Python?

Added 25 Nov 2026

What does np.arange(0, 10, 2) produce in Python?

  1. [0 2 4 6 8] Correct answer
  2. [0 2 4 6 8 10]
  3. [2 4 6 8 10]
  4. [0 1 2 3 4]

Correct answer

A. [0 2 4 6 8]

6 views

MCQSEXAM

Explanation

arange excludes the stop value.

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 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