You can divide by 10, 10**2, 10**3 and so on and keep the integer part
1-Liner using the list comprehension
[1234//10**i for i in range(len(str(1234)))]
Or
ans = []
for i in range(len(str(1234))):
ans.append(1234//10**i )
Output:
[1234, 123, 12, 1]
Learn data science with python course to improve your technical knowledge.