Hey all - this is the code that I wrote that works, but it is different than most of the solutions I see here. Is this acceptable or is there a better way? If there's a better way, please provide a why so I can have a greater understanding of Python. Thanks!
def digit_sum(n): total = 0 for i in str(n): total += int(i) return total