#try to avoid input function a = (11,2222,333,44444,555,66,7677,887688,999) b = [] for i in a: summ = 0 i = str(i) for j in i: summ = summ+int(j) b.append(summ) print(tuple(b))
Click the run button. Try to avoid input() function.