Try this:

lst = input('insert numbers:  ')
lst = [int(d) for d in lst]
lst

As your comment, try only this one line:

[int(d) for d in input('insert numbers:  ')]
Answer from Mahdi F. on Stack Overflow
Discussions

python - How do I create a list with numbers between two values? - Stack Overflow
Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... Use range. In Python 2, it returns a list directly: ... In Python 3, range is an iterator. To convert it to a list: ... Note: The second number in range(start, stop) is exclusive. More on stackoverflow.com
๐ŸŒ stackoverflow.com
Creating a list of numbers containing 1 to 10 using the range() function and/ or a for loop
There's many ways to do that. Here's one way: *data, = range(1,11) More on reddit.com
๐ŸŒ r/learnpython
4
1
September 26, 2020
How to create a list of numbers from 1 to 48 without hardcoding it ?
myList = list(range(1,49)) If you don't want to be made fun of you'll also want to read PEP8, especially the section on naming styles, where you will learn you want to name this my_list, not the Java-style myList you have now. Edit: are you sure you need a list? What are you using this for? If you just want to iterate over it you can simply use a range object. for i in range(1, 49): More on reddit.com
๐ŸŒ r/learnpython
8
1
June 12, 2019
List of ordinal numbers using an if-elif-else chain
You're not looping through the list...that's why you get the error. Try something like... for ord_num in ordinal_numbers: # place your if-elif-else block here if ord_num < 2: print(str(ord_num) + "st") # you need to convert the number to a str type to be able to print it elif . . . . . . . More on reddit.com
๐ŸŒ r/learnpython
3
2
March 22, 2017
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-create-list-of-numbers-with-given-range
Create List of Numbers with Given Range - Python - GeeksforGeeks
Explanation: list comprehension iterates through a sequence of numbers generated by range(r1, r2), which starts at r1 and ends at r2 .
Published: July 11, 2025
๐ŸŒ
Moonbooks
en.moonbooks.org โ€บ Articles โ€บ How-to-create-a-list-of-numbers-in-python-
How to Create a List of Numbers in Python - Moonbooks
March 9, 2018 - To create a list of numbers in Python, the most common solution is to use range() with list().
๐ŸŒ
Finxter
blog.finxter.com โ€บ home โ€บ learn python blog โ€บ python create list from 1 to n
Python Create List from 1 to N - Be on the Right Side of Change
April 20, 2024 - To create a list of numbers from 1 to N, use the list() function, as shown below: ... Again, the second argument of the range() function is exclusive, so you need to add 1 to N. Creating an empty list in Python is quite straightforward.
๐ŸŒ
Snakify
snakify.org โ€บ lists
Lists - Learn Python 3 - Snakify
To store such data, in Python you can use the data structure called ยท list (in most programming languages the different term is used โ€” โ€œarrayโ€). A list is a sequence of elements numbered from 0, just as characters in the string.
Find elsewhere
๐ŸŒ
Python Examples
pythonexamples.org โ€บ python-create-a-list-of-numbers-from-1-to-n
Create a List of Numbers from 1 to n in Python
To create a list of numbers from 1 to n in Python, we can use For Loop with a range object, where range object starts at 1 and ends at n.
๐ŸŒ
Real Python
realpython.com โ€บ lessons โ€บ number-lists
Work With Lists of Numbers (Video) โ€“ Real Python
03:03 In this lesson, youโ€™ve learned how you can work with lists of numbers using some common built-in Python functions.
Published: January 23, 2024
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ python_lists.asp
Python Lists
Remove List Duplicates Reverse a String Add Two Numbers ยท Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Practice Problems Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Training ... Lists are used to store multiple items in a single variable. Lists are one of 4 built-in data types in Python used to store collections of data, the other 3 are Tuple, Set, and Dictionary, all with different qualities and usage.
๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ python-how-to-work-with-lists-of-integers-in-python-417500
How to work with lists of integers in Python | LabEx
In Python, a list of integers can be created using square brackets [] and the integers separated by commas. For example, [1, 2, 3, 4, 5] is a list of five integers. Lists can be used to store a wide variety of data, including numbers, strings, ...
๐ŸŒ
Bobby Hadz
bobbyhadz.com โ€บ blog โ€บ python-create-list-of-numbers-from-1-to-n
Create a List of Numbers from 1 to N in Python | bobbyhadz
April 10, 2024 - The get_range function takes n as a parameter and creates a list of numbers from 1 to n. On each iteration, we append the current start value to the list and increment it. Once the start value is equal to or greater than n, the condition is no longer met and the while loop exits. You can learn more about the related topics by checking out the following tutorials: Find Max and Min in List without max() and min() in Python
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python-lists
Python Lists - GeeksforGeeks
The task of creating a list of numbers within a given range involves generating a sequence of integers that starts from a specified starting point and ends just before a given endpoint. For example, if the range is from 0 to 10, the resulting list would contain the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8 ... Python lists are dynamic, which means we can add items to them anytime.
Published: June 3, 2025
๐ŸŒ
w3resource
w3resource.com โ€บ python-exercises โ€บ basic โ€บ python-basic-1-exercise-115.php
Python: Generate and prints a list of numbers from 1 to 10 - w3resource
May 24, 2025 - # Create a range of numbers from 1 to 10 (exclusive). nums = range(1, 10) # Print the original list of numbers using the 'list' function. print(list(nums)) # Convert each number in the list to a string using the 'map' function.
๐ŸŒ
Replit
replit.com โ€บ discover โ€บ how-to-create-a-list-of-numbers-in-python
How to create a list of numbers in Python
Describe what you want. Replit builds it. Get a working app or website in minutes. No coding required.
๐ŸŒ
Astrofrog
astrofrog.github.io โ€บ py4sci โ€บ _static โ€บ 04. Numbers, String, and Lists.html
04. Numbers, String, and Lists
There are several kinds of ways of storing sequences in Python, the simplest being the list, which is simply a sequence of any Python object. ... Similarly to strings, you can find the length of a list (the number of elements) with the len function:
๐ŸŒ
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)
๐ŸŒ
Google
developers.google.com โ€บ google for education โ€บ python โ€บ python lists
Python Lists | Python Education | Google for Developers
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.