split a string into a list of integers in Python append code example Example: split numbers python num = 12345 >>> [int(i) for i in str(num)] [1, 2, 3, 4, 5]