inp = int(input(\"Enter a number:\")) for i in inp: n = n + i; print (n)
... throws an error: \'int\' object is not iterable<
\'int\' object is not iterable
try:
for i in str(inp):
That will iterate over the characters in the string representation. Once you have each character you can use it like a separate number.