Why it can not pass?



the tips:Oops, try again. Your function fails on digit_sum(434). It returns None when it should return 11.

def digit_sum(n):
    a = 0
    for i in str(n):
        a = a + int(i)
    print a


HI instead of print you should use return on this line

print a


thank you so much for your help!