input: Write a function to calculate the sum of all the even numbers in a given list of integers. If the list is empty, return 0. This function should iterate through each element in the list, check if it is even, and if so, add it to a running total which is initialized to 0. The final sum should be returned after the iteration is complete.
  assert sum_even_numbers([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==30
  assert sum_even_numbers([2, 4, 6, 8, 10])==30
  assert sum_even_numbers([1, 3, 5, 7, 9])==0
  assert sum_even_numbers([])==0
  assert sum_even_numbers([-2, 0, 2, 4])==4
output: def sum_even_numbers(lst):
      total = 0
      for num in lst:
          if num % 2 == 0:
              total += num
      return total