Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. James Harwood

James Harwood

Community Learner
Active in: Python
Share
0Questions
1Answers
0Views on questions

How does the Python's range function work?

Python's range() returns an immutable sequence object (an iterable) rather than a list. It generates numbers on demand using lazy evaluation, calculating each value only when needed based on its stored start, stop, and step parameters. Because it only stores these three integers, it maintains a constant memory…

Python

Answered Dec 19, 2025 · 881 Views Read answer →

More members from the Python community

Learners asking and answering questions on the same topics — follow their questions and join in.

Latest Python Blogs

Guides, tips and career advice on Python from JanBask experts.

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.