You can just construct a list from the range object:

my_list = list(range(1, 1001))

This is how you do it with generators in python2.x as well. Typically speaking, you probably don't need a list though since you can come by the value of my_list[i] more efficiently (i + 1), and if you just need to iterate over it, you can just fall back on range.

Also note that on python2.x, xrange is still indexable1. This means that range on python3.x also has the same property2

1print xrange(30)[12] works for python2.x

2The analogous statement to 1 in python3.x is print(range(30)[12]) and that works also.

Answer from mgilson on Stack Overflow
๐ŸŒ
Codecademy
codecademy.com โ€บ docs โ€บ python โ€บ built-in functions โ€บ range()
Python | Built-in Functions | range() | Codecademy
April 28, 2025 - When you wrap it with list(), it creates a list containing all the numbers from the range. Yes, you can use range() with negative values for start, stop, or step. This is commonly used for counting backwards.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ range-to-a-list-in-python
range() to a list in Python - GeeksforGeeks
July 11, 2025 - However, it produces a range object, which is an iterable but not a list. If we need to manipulate or access the numbers as a list, we must explicitly convert the range object into a list.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-create-list-of-numbers-with-given-range
Create List of Numbers with Given Range - Python - GeeksforGeeks
Each number in this range is added to the list li. numpy.arange() from the NumPy library that generates an array of evenly spaced values over a specified range. It is highly efficient for creating large sequences of numbers, particularly when performing numerical computations or working with multidimensional data. Python ยท
Published ย  July 11, 2025
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ ref_func_range.asp
Python range() Function
Remove List Duplicates Reverse ... Training ... The range() function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and stops before a specified number....
๐ŸŒ
Quora
quora.com โ€บ How-do-I-select-a-range-of-numbers-in-an-array-in-Python
How to select a range of numbers in an array in Python - Quora
This extracting specific range values from an array is called โ€˜slicingโ€™. This works same for an array(1-d), list or series in python.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ python-range-function-example
Python range() Function Example
March 17, 2023 - For that, you could use range() and pass the length of your list as an argument to the function. To calculate the length of a list, use the len() function. programming_languages = ["Python", "JavaScript", "Java", "C++"] programming_languages_length ...
Find elsewhere
๐ŸŒ
docs.python.org
docs.python.org โ€บ 3 โ€บ library โ€บ functions.html
Built-in Functions โ€” Python 3.14.3 documentation
3 weeks ago - Return the length (the number of items) of an object. The argument may be a sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).
๐ŸŒ
Python Basics
pythonbasics.org โ€บ range-function
Python Range() function explained - Python Tutorial
To do that, you can use the range() function. By calling list(range(100)) it returns a list of 100 numbers. Writing them out by hand would be very time consuming, so instead use the range function: Python starts counting from zero.
๐ŸŒ
Coursera
coursera.org โ€บ tutorials โ€บ python-range
How to Use Range in Python | Coursera
As we've already seen, you can iterate through this using a for loop. You can see how this works in the examples above. Although range objects behave like lists, they are not lists.
๐ŸŒ
Mimo
mimo.org โ€บ glossary โ€บ python โ€บ range-function
Python range() Function [Python Tutorial]
Using range() to iterate over indices rather than elements avoids creating additional lists and optimizes memory. Particularly in large lists of large objects, accessing items by index can be much more efficient with range(). ... Python 2 has a built-in function called xrange() to create ranges.
๐ŸŒ
Python Morsels
pythonmorsels.com โ€บ range
Python's range() function - Python Morsels
January 14, 2025 - You can think of the three arguments given to range as similar to the three values we can use when slicing a sequence in Python: >>> message = "value exalt apprise esteem" >>> message[6:19:2] 'eatapie' These indices that we give are: the start, the stop, and the step indices. Just like with a range function, we have a start value, a stop value, and a step value: >>> list(range(6, 19, 2)) [6, 8, 10, 12, 14, 16, 18]
๐ŸŒ
Stanford CS
cs.stanford.edu โ€บ people โ€บ nick โ€บ py โ€บ python-range.html
Python range() Function
>>> list(range(2)) [0, 1] >>> list(range(1)) [0] >>> list(range(0)) # n <= 0, no numbers [] >>> list(range(-42)) [] Probably the second most common problem is to go through the standard index numbers, but in reverse order. The reversed() function takes in a linear collection and returns a reversed form of it. This works nicely with range() to go over the regular numbers in reverse order: >>> s = 'Python' >>> len(s) 6 >>> for i in reversed(range(len(s))): ...
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ python_range.asp
Python range
Remove List Duplicates Reverse ... Certificate Python Training ... The built-in range() function returns an immutable sequence of numbers, commonly used for looping a specific number of times....
๐ŸŒ
Google
developers.google.com โ€บ google for education โ€บ python โ€บ python lists
Python Lists | Python Education | Google for Developers
January 23, 2026 - Python's built-in list type is defined using square brackets [ ] and elements are accessed using zero-based indexing. Assigning one list variable to another makes both variables point to the same list in memory. The for and in constructs are used to iterate over list elements or check for element presence. The range() function is often used with a for-loop to create a traditional numeric loop.
๐ŸŒ
Flexiple
flexiple.com โ€บ python โ€บ create-list-numbers-with-given-range-python
Create A List Of Numbers With Given Range In Python - Flexiple
Learn to efficiently create a list of numbers within a specified range in Python using methods like range(), map(), and lambda functions with examples.
๐ŸŒ
Real Python
realpython.com โ€บ python-range
Python range(): Represent Numerical Ranges โ€“ Real Python
November 24, 2024 - A range is a Python object that represents an interval of integers. Usually, the numbers are consecutive, but you can also specify that you want to space them out. You can create ranges by calling range() with one, two, or three arguments, as the ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-range-function
Python range() function - GeeksforGeeks
To access elements like a list, convert it using list(range(...)).
Published ย  2 weeks ago