input: Write a function to calculate the total sum of all elements in the given list using a for loop. If the given list is empty, return 0.
  assert sum_elements([1, 9, 3, 5])==18
  assert sum_elements([0, -1, 2, -3, 4])==2
  assert sum_elements([10])==10
  assert sum_elements([])==0
output: def sum_elements(lst):
      total = 0
      for num in lst:
          total += num
      return total