Convert the integer to string first, and then use map to apply int on it:

>>> num = 132
>>> map(int, str(num))    #note, This will return a map object in python 3.
[1, 3, 2]

or using a list comprehension:

>>> [int(x) for x in str(num)]
[1, 3, 2]
Answer from Ashwini Chaudhary on Stack Overflow
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-convert-number-to-list-of-integers
Python - Convert Number to List of Integers - GeeksforGeeks
Combination of str() and map() is a straightforward and efficient way to convert a number into a list of integers.
Published: July 11, 2025
Discussions

python - Converting integer to digit list - Stack Overflow
What is the quickest and cleanest way to convert an integer into a list? For example, change 132 into [1,3,2] and 23 into [2,3]. I have a variable which is an int, and I want to be able to compar... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Convert NumPy array to Python list - Stack Overflow
How do I convert a NumPy array into a Python List? More on stackoverflow.com
๐ŸŒ stackoverflow.com
Split up an integer of numbers into arrays of numbers
Convert the number to a string and the use slice notation to select the desired digits. More on reddit.com
๐ŸŒ r/learnpython
4
3
March 25, 2021
How to create an integer array in Python? - Stack Overflow
I highly recommend the Python tutorial: docs.python.org/tutorial It'll only take a couple hours of your time. ... If you are not satisfied with lists (because they can contain anything and take up too much memory) you can use efficient array of integers: More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
Finxter
blog.finxter.com โ€บ home โ€บ learn python blog โ€บ how to convert an integer to a list in python
How to Convert an Integer to a List in Python - Be on the Right Side of Change
August 22, 2022 - Python has several built-in Data Type Structures: one of them being a List. The List Data Structure is made up of square brackets ([]) containing elements separated by a comma (,). These elements can be made up of Strings, Integers, Floats, Mixed Types, or other Data Structures, such as a List of Lists. ... For fun, letโ€™s convert the circumference of the Moon (10,921 km) into a List of Integers. ๐Ÿ’กNote: Before creating a List of Lists from an Integer, it must be converted into a String as Strings are iterable: Integers are not.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ convert-lists-to-arrays-and-back-in-python
How to Convert a List to an Array and Back in Python
December 11, 2025 - Sometimes, you may need to convert between arrays and lists in Python. For example, you may have data stored in a list that you need to pass to a function that requires an array.
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ python-convert-numpy-array-to-list
Convert NumPy Array to List in Python Easily | DigitalOcean
April 19, 2025 - Learn how to convert a NumPy array to a Python list using simple methods with code examples. Ideal for beginners and data scientists working with NumPy.
Top answer
1 of 12
106

Convert the integer to string first, and then use map to apply int on it:

>>> num = 132
>>> map(int, str(num))    #note, This will return a map object in python 3.
[1, 3, 2]

or using a list comprehension:

>>> [int(x) for x in str(num)]
[1, 3, 2]
2 of 12
24

There are already great methods already mentioned on this page, however it does seem a little obscure as to which to use. So I have added some mesurements so you can more easily decide for yourself:


A large number has been used (for overhead) 1111111111111122222222222222222333333333333333333333

Using map(int, str(num)):

import timeit

def method():
    num = 1111111111111122222222222222222333333333333333333333
    return map(int, str(num))

print(timeit.timeit("method()", setup="from __main__ import method", number=10000)

Output: 0.018631496999999997

Using list comprehension:

import timeit

def method():
    num = 1111111111111122222222222222222333333333333333333333
    return [int(x) for x in str(num)]

print(timeit.timeit("method()", setup="from __main__ import method", number=10000))

Output: 0.28403817900000006

Code taken from this answer

The results show that the first method involving inbuilt methods is much faster than list comprehension.

The "mathematical way":

import timeit

def method():
    q = 1111111111111122222222222222222333333333333333333333
    ret = []
    while q != 0:
        q, r = divmod(q, 10) # Divide by 10, see the remainder
        ret.insert(0, r) # The remainder is the first to the right digit
    return ret

print(timeit.timeit("method()", setup="from __main__ import method", number=10000))

Output: 0.38133582499999996

Code taken from this answer

The list(str(123)) method (does not provide the right output):

import timeit

def method():
    return list(str(1111111111111122222222222222222333333333333333333333))
    
print(timeit.timeit("method()", setup="from __main__ import method", number=10000))

Output: 0.028560138000000013

Code taken from this answer

The answer by Duberly Gonzรกlez Molinari:

import timeit

def method():
    n = 1111111111111122222222222222222333333333333333333333
    l = []
    while n != 0:
        l = [n % 10] + l
        n = n // 10
    return l

print(timeit.timeit("method()", setup="from __main__ import method", number=10000))

Output: 0.37039988200000007

Code taken from this answer

Remarks:

In all cases the map(int, str(num)) is the fastest method (and is therefore probably the best method to use). List comprehension is the second fastest (but the method using map(int, str(num)) is probably the most desirable of the two.

Those that reinvent the wheel are interesting but are probably not so desirable in real use.

Find elsewhere
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ article โ€บ convert-number-to-list-of-integers-in-python
Convert number to list of integers in Python
March 15, 2026 - Here's how to handle negative numbers ? negative_number = -1342 # Method 1: Using absolute value digits_list1 = [int(digit) for digit in str(abs(negative_number))] print("Using abs():", digits_list1) # Method 2: Remove minus sign first digits_list2 ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-program-to-convert-list-of-integer-to-list-of-string
Python - Convert List of Integers to a List of Strings - GeeksforGeeks
July 12, 2025 - For example, if we have a list like [1, 2, 3] then the output should be ['1', '2', '3']. In Python, there are multiple ways to do this efficiently, some of them are: using functions like map(), reduce() or even list comprehensions.
๐ŸŒ
w3resource
w3resource.com โ€บ python-exercises โ€บ list โ€บ python-data-type-list-exercise-234.php
Python: Convert a given number (integer) to a list of digits - w3resource
June 28, 2025 - # Define a function 'digitize' that takes an integer 'n' as input. def digitize(n): # Convert the integer 'n' to a string, map each character to an integer, and create a list of those integers. return list(map(int, str(n))) # Call the 'digitize' ...
๐ŸŒ
Quora
quora.com โ€บ How-do-I-convert-an-7-digit-integer-to-a-list-in-Python
How to convert an 7-digit integer to a list in Python - Quora
Quora is a place to gain and share knowledge. It's a platform to ask questions and connect with people who contribute unique insights and quality answers.
๐ŸŒ
DataCamp
datacamp.com โ€บ doc โ€บ numpy โ€บ array-to-list
NumPy Array to List
In this syntax, array is the NumPy array you wish to convert into a Python list.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ article โ€บ conversion-of-integer-string-to-list-in-python
Conversion of Integer String to list in Python
March 27, 2026 - import numpy as np int_str = "11 16 17 14 89" result = np.fromstring(int_str, dtype=int, sep=' ').tolist() print("Converted list:", result) ... Use map() with split() for space-separated integers, and list comprehension for individual digit ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-convert-array-ordinary-list-items
Python - Convert an array to an ordinary list with the same items - GeeksforGeeks
December 17, 2024 - import array # Example with a regular ... 'a' print(b) ... If we are working with a NumPy array, we can use the tolist() method to convert it into a regular Python list....
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-integers-string-to-integer-list
Python - Integers String to Integer List - GeeksforGeeks
July 15, 2025 - The map(int, s.split()) applies the int function to each element, converting them to integers, and list() collects the results into a list, which is then printed as [1, 2, 3, 4, 5].
๐ŸŒ
Programiz
programiz.com โ€บ python-programming โ€บ array
Python Array of Numeric Values
March 26, 2024 - If that's the case, visit the Python list tutorial. To create an array of numeric values, we need to import the array module. For example: import array as arr a = arr.array('d', [1.1, 3.5, 4.5]) print(a) ... Here, we created an array of float type.
๐ŸŒ
Ducmanhphan
ducmanhphan.github.io โ€บ 2022-04-17-how-to-convert-int-to-list-integer
How to convert int[] to List of Integer
Below is the solution that we use stream() method of Arrays class. int[] rawData = {1, 3, 5}; List<Integer> data = Arrays.stream(rawData) // IntStream .boxed() // Stream<Integer> .collect(Collectors.toList());