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