Now as to why I asked you to do that, your code has a ton of extra stuff that is purely not needed.

def digit_sum(data):
"""
This function converts the data into a string, then iterates over it adding it to
a list. It then converts it back into an int when it adds it to the list. After that
it uses the built-in function sum() to add the list together.
"""
return sum([int(digit) for digit in str(data)])

While you are still new to Python I would get into the habit of programming in the most pythonic way that you are capable of. Also as a note codeacademy's courses are not pythonic is the slightest. Go above and beyond and you will appreciate python more that way.

A common neologism in the Python community is pythonic, which can have a wide range of meanings related to program style. To say that code is pythonic is to say that it uses Python idioms well, that it is natural or shows fluency in the language, that it conforms with Python's minimalist philosophy and emphasis on readability.

Another thing to consider is one Python engineer’s words:

To describe something as clever is not considered a compliment in the Python culture.

You’ll learn modules and functions naturally as you practice more and more, but reading documentation never hurt anyone B)