input: 
  from typing import List
  
  def sum_list(list: List[int]) -> int:
      """
      Calculates the sum of all elements in a given list of integers.
      
      >>> sum_list([1, 2, 3, 4])
      10
      >>> sum_list([-1, 0, 1])
      0
      """
      sum_list = 0
      for num in list:
          sum_list += num
      return sum_list
  
output:     sum_list = 0
      for num in list:
          sum_list += num
      return sum_list