Integers to list | SoloLearn: Learn to code for FREE!

+1

Integers to list

how can an integer be split into a list e. g n=123 so I want n to be split into list that looks like this [1,2,3]

1 Answer

New Answer

+9

n = 123 nList = list(map(lambda x: int(x), str(n)))