digits =  def digit_sum(n): for x in str(n): digits.append(int(x)) print sum(digits)
Python tells me that my function returns none. However, when I run the function myself it returns the correct answer. I feel like I'm going crazy!
"Oops, try again. Your function fails on digit_sum(434). It returns None when it should return 11"