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
๐ŸŒ
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.
๐ŸŒ
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....
๐ŸŒ
docs.python.org
docs.python.org โ€บ 3 โ€บ library โ€บ functions.html
Built-in Functions โ€” Python 3.14.3 documentation
3 weeks ago - Rather than being a function, range is actually an immutable sequence type, as documented in Ranges and Sequence Types โ€” list, tuple, range.
๐ŸŒ
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.
Find elsewhere
๐ŸŒ
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))): ...
๐ŸŒ
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
March 18, 2024 - 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 ...
๐ŸŒ
Stanford
web.stanford.edu โ€บ class โ€บ archive โ€บ cs โ€บ cs106a โ€บ cs106a.1204 โ€บ handouts โ€บ py-range.html
Python range() Function
The difference is the "step" amount between numbers is now custom. Once the number is equal or goes beyond the stop, the range ends. As before, the stop number itself is always omitted. >>> list(range(0, 10, 2)) [0, 2, 4, 6, 8] >>> list(range(0, 10, 6)) [0, 6] >>> list(range(200, 800, 100)) [200, 300, 400, 500, 600, 700]
๐ŸŒ
Programiz
programiz.com โ€บ python-programming โ€บ methods โ€บ built-in โ€บ range
Python range() Function
Python List Comprehension ยท Python Generators ยท Python set() Python slice() The Python range() function generates a sequence of numbers. By default, the sequence starts at 0, increments by 1, and stops before the specified number. # create a sequence from 0 to 3 numbers = range(4) # iterating ...
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ python-range-function
Python Range() Function Tutorial | DataCamp
September 16, 2024 - for num in range(0.2,2.4): print(num) # Expected output: # TypeError: 'float' object cannot be interpreted as an integer ยท You would have scratched your head at least once while trying to reverse a linked list of integer values in C language. However, in Python, it can be achieved with the range() function with just interchanging the start and stop along with adding a negative step size.
๐ŸŒ
YouTube
youtube.com โ€บ watch
Python Range Explained | Python Ranges vs Lists - YouTube
๐Ÿ’ป *Get my Source Codes and support the channel* โค๏ธ: https://www.buymeacoffee.com/fabiomusanni/extrasโฌ‡๏ธ *LEARN ON THE BEST LEARNING PLATFORMS (LINKS BELOW)* ...
Published ย  September 5, 2022
๐ŸŒ
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....
๐ŸŒ
Python documentation
docs.python.org โ€บ 3 โ€บ tutorial โ€บ datastructures.html
5. Data Structures โ€” Python 3.14.3 documentation
This chapter describes some things youโ€™ve learned about already in more detail, and adds some new things as well. More on Lists: The list data type has some more methods. Here are all of the method...
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ python-range-function-explained-with-code-examples
Python range() Function โ€“ Explained with Code Examples
October 6, 2021 - If you remember, all iterables in Python follow zero-indexing. This is why it's convenient to use range() to loop through iterables. An iterable of length len has 0, 1, 2, ..., len-1 as the valid indices. So to traverse any iterable, all you need to do is to set the stop value to be equal to len. The sequence you'll get โ€“ 0, 1, 2, ..., len-1 โ€“ is the sequence of valid indices. โ–ถ Let's take a more helpful example. You have a list my_list.