Oops, try again. Your function fails on digit_sum(434). It returns None when it should return 11.
Expected it to work, considering I've been playing around with it on 'spyder' and it works fine on there, even if I isolate each line of the code. Just not working when moving back to codecademy - probably just a formatting error I can't see!
Replace this line with your code. def digit_sum(n): """Returns the sum of all of n's digits""" s = 0 a = str(n) b =  print a for i in range(0, len(a)): b.append(a[i]) #print b for i in b: s += int(i) print s