input: Write a function that takes an integer and returns the sum of its digits.
  
  assert sum_of_digits(6342) == 15
  assert sum_of_digits(12345) == 15
  assert sum_of_digits(987) == 24
  assert sum_of_digits(1001) == 2
  assert sum_of_digits(0) == 0
output: def sum_of_digits(n):
      return sum(int(digit) for digit in str(n))