Traceback (most recent call last):
File "python", line 10, in
File "python", line 4, in digit_sum
TypeError: 'int' object is not iterable
Oops, try again. Does your digit_sum function take exactly one argument (a positive integer)? Your code threw a "'int' object is not iterable" error.
It should work. It decode all the stuff in the function and append it to my list
def digit_sum(number): numbers =  total = 0 for key in abs(number): numbers.append(key) for stuff in numbers: total += stuff return total print(digit_sum(1234))