Use range. In Python 2, it returns a list directly:

>>> range(11, 17)
[11, 12, 13, 14, 15, 16]

In Python 3, range is an iterator. To convert it to a list:

>>> list(range(11, 17))
[11, 12, 13, 14, 15, 16]

Note: The second number in range(start, stop) is exclusive. So, stop = 16+1 = 17.


To increment by steps of 0.5, consider using numpy's arange() and .tolist():

>>> import numpy as np
>>> np.arange(11, 17, 0.5).tolist()

[11.0, 11.5, 12.0, 12.5, 13.0, 13.5,
 14.0, 14.5, 15.0, 15.5, 16.0, 16.5]

See: How do I use a decimal step value for range()?

Answer from Jared on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-create-list-of-numbers-with-given-range
Create List of Numbers with Given Range - Python - GeeksforGeeks
range() generates an iterator that produces numbers within a specified range. It is highly efficient as it doesn’t create the entire list upfront, making it memory-friendly. Converting the iterator to a list gives us the full range of numbers.
Published   July 11, 2025
🌐
Flexiple
flexiple.com › python › create-list-numbers-with-given-range-python
Create A List Of Numbers With Given Range In Python - Flexiple
The itertools module is part of the Python standard library and is used for efficient looping and iterable manipulation. One useful function from itertools is count(). It creates an iterator that generates consecutive integers indefinitely. To create a finite range, you can combine it with islice() from the same module. ... from itertools import count, islice # Creating a list of numbers from 5 to 10 numbers = list(islice(count(5), 6)) print(numbers)
🌐
Stanford CS
cs.stanford.edu › people › nick › py › python-range.html
Python range() Function
This use of list() is only for printing, not needed to use range() in a loop. >>> list(range(5)) [0, 1, 2, 3, 4] >>> list(range(10)) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> list(range(2)) [0, 1] What is range(0)? Well range(n) returns n numbers, so this case returns no numbers at all - like the empty 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....
🌐
LabEx
labex.io › tutorials › python-how-to-create-a-list-with-a-range-of-numbers-in-python-398166
How to create a list with a range of numbers in Python | LabEx
Before we dive into creating lists with ranges, let us understand the basics of Python lists. First, let us create a new Python file to work with. In the WebIDE: ... ## Basic list creation numbers = [1, 2, 3, 4, 5] print("Basic list:", numbers) ## Lists can contain different data types mixed_list = [1, "hello", 3.14, True] print("Mixed data types:", mixed_list) ## Accessing list elements (indexing starts at 0) print("First element:", numbers[0]) print("Last element:", numbers[4]) ## Getting the length of a list print("List length:", len(numbers)) ## Modifying list elements numbers[2] = 30 print("Modified list:", numbers) ## Adding elements to a list numbers.append(6) print("After append:", numbers) ## Removing elements from a list numbers.remove(30) print("After remove:", numbers)
🌐
GeeksforGeeks
geeksforgeeks.org › python › range-to-a-list-in-python
range() to a list in Python - GeeksforGeeks
July 11, 2025 - In Python, the range() function is used to generate a sequence of numbers. 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 ...
🌐
w3resource
w3resource.com › python › built-in-function › range.php
Python range() function - w3resource
August 19, 2022 - The range() function is used to get a sequence of numbers, starting from 0 by default, and increments by 1 by default, and ends at a specified number. Note: Sequence Types - list, tuple, range etc.
Find elsewhere
🌐
Programiz
programiz.com › python-programming › methods › built-in › range
Python range() Function
The range() function returns an immutable sequence of numbers. # create a sequence from 0 to 3 (4 is not included) numbers = range(4) # convert to list and print it print(list(numbers)) # Output: [0, 1, 2, 3]
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-range-function
Python range() function - GeeksforGeeks
To access elements like a list, convert it using list(range(...)). Example: This example shows the use of range() to generate numbers starting from 0 up to (but not including) a given value.
Published   2 weeks ago
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › convert python range to list
Convert Python Range to List - Spark By {Examples}
May 31, 2024 - The range() function in Python returns a sequence of numbers based on the specified start, stop, and step values. The default behavior of the range() function is to start from 0 and increment by 1.
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › convert range to list in python
Convert Range to List in Python - Spark By {Examples}
May 31, 2024 - Let’s create a range of sequence values that start at 10, and end at 15 and store it to a variable, use this range variable as an argument to list() function to convert to a list.
🌐
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 ...
🌐
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]
🌐
LabEx
labex.io › tutorials › initialize-list-with-range-13661
Initialize List with Range in Python | LabEx
A list containing the numbers in ... In this challenge, you learned how to create a list of numbers using the initialize_list_with_range() function....
🌐
Quora
quora.com › Does-the-range-function-in-Python-create-store-a-list-of-numbers-and-does-it-increment-by-1-whether-theres-one-parameter-or-two-parameters
Does the range function (in Python) create/ store a list of numbers, and does it increment by 1, whether there's one parameter or two parameters? - Quora
In Python 2, [code ]range()[/code] creates an actual list, while [code ]xrange()[/code] is a special “Xrange type” which generates the values sequentially without actually storing the entire list in memory.
🌐
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....
🌐
PYnative
pynative.com › home › python › python range() explained with examples
Python range() Function Explained with Examples
March 17, 2022 - In Python 2, range() returns the list object, i.e., It does generate all numbers at once. The range(1, 500) will generate a Python list of 499 integers in memory.