Write a python function, find_ten_substring(num_str) which accepts a string and returns the list of 10-sub strings of that string.
A 10-sub string of a number is a sub string of its digits that sum up to 10. sample input='3523014' actual output=['5230', '23014', '523', '352']
i have tried the below code it is printing only one sub string that adds up 10 (only [28])and then terminating.
def find_ten_substring(num_str):
sumi=0
list1=[]
substr=''
for i in range(0,len(num_str)):
for j in range(i,len(num_str)):
sumi=sumi+int(num_str[j])
substr=substr+num_str[j]
if(sumi==10):
list1.append(substr)
print(list1)
break
sumi=0
substr=''
continue
num_str="2825302"
print("The number is:",num_str)
result_list=find_ten_substring(num_str)
print(result_list)