When I run the following code in repl.it, it functions correctly. However, when I run it in the codecademy assignment, I receive the following error: "Oops, try again. Your function fails on digit_sum(434). It returns None when it should return 11."
Why is this?
def digit_sum(n): numbers = str(n) alist =  total = 0 for i in numbers: alist.append(i) for x in alist: total += int(x) print total