input: Write a function to find the sum of a given list of numbers and print the result. The function should take a list of numbers as input and return the sum of the list elements.
  def sum_list(arr):
      """Finds the sum of a given list of numbers.
      
      Args:
          arr (list): List of numbers.
          
      Returns:
          int: Sum of list elements.
      """
      sum = 0
      for num in arr:
          sum += num
      return sum
  
  assert sum_list([1, 2, 3])==6
  assert sum_list([-1, 0, 1])==0
  assert sum_list([])==0
  assert sum_list([10, 20, 30, 40])==100
  assert sum_list([5])==5
output: def sum_list(arr):
      sum = 0
      for num in arr:
          sum += num
      return sum