input: Write a function to find the sum of all the digits of an integer.
  assert sum_of_digits(1234) == 10
  assert sum_of_digits(0) == 0
  assert sum_of_digits(567) == 18
  assert sum_of_digits(99999) == 45
output: def sum_of_digits(n):
      return sum(int(digit) for digit in str(n))