Python: Basic: Sum Digits

Write the function sum_digits that takes an integer n and returns the sum of the digits in n.


sum_digits(123) -> 6
sum_digits(12011) -> 5

Test 1    

Test 2    

Test 3    

Test 4