python - How to split an integer into an array of digits? - Stack Overflow

PHOTO EMBED

Tue Aug 24 2021 17:29:37 GMT+0000 (Coordinated Universal Time)

Saved by @hbroph123 #python

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

[1, 2, 3, 4, 5]
content_copyCOPY

https://stackoverflow.com/questions/1906717/how-to-split-an-integer-into-an-array-of-digits