input: from typing import List
  
  def sum_of_digits(num: int) -> int:
      """ Calculate the sum of the digits of a given number.
      >>> sum_of_digits(6342)
      15
      >>> sum_of_digits(12345)
      15
      """
      
      total = 0
      for ch in str(num):
          total += int(ch)
      return total
output:     total = 0
      for ch in str(num):
          total += int(ch)
      return total