I have a string of integers e.g. s = "1234"
I want to split it to the individual sequential combinations of integers split = [ 1234, 1, 2, 3, 4, 12, 123, 23, 234, 34 ]
How can I code this in Python?
What i tried:
for i in range(0,len(number)-1):
x =["" + number[j] for j in range(i, len(number))]
print(x)
Output:
['1', '2', '3', '4', '5']
['2', '3', '4', '5']
['3', '4', '5']
['4', '5']