How to split an integer into an array of digits?

>>> [int(i) for i in str(12345)]

[1, 2, 3, 4, 5]

Leave a Comment