Hello everyone, I was making the lesson and when I run the code I got a error message that says it's incorrect, even if I try with that number, I tried to print the function and it's alright
Message: Oops, try again. Your function fails on digit_sum(434). It returns 0 when it should return 11.
[1, 2, 3, 4]
[1, 2, 3, 4, 5]
lst =  def digit_sum(n): var = 0 j = str(n) for i in j: lst.append(int(i)) if len(lst) == len(j): var = 0 var = int(sum(lst)) return var print digit_sum(434) lost = [1, 2, 3, 4] #Trying to get Logic print sum(lost) print lost lost.append(5) print lost print lost[len(lost) - 1]