I want to show in a line the addition of the digits of a positive integer. For example if input is
4316
I want it to output
4+3+1+6
Also the input can be any x amount of digits.
Call str
on the number and str.join
the result of that:
i = 4316
print("+".join(str(i)))
4+3+1+6