What is the quickest and cleanest way to convert an integer into a list?
integer
list
For example, change 132 into [1,3,2] an
132
[1,3,2]
Use list on a number converted to string:
In [1]: [int(x) for x in list(str(123))] Out[2]: [1, 2, 3]