input: Write a function to calculate the sum of all non-negative integers in a list.
  assert sum_nonnegatives([4, -4, 2, -2]) == 6
  assert sum_nonnegatives([1, -1, 3, -3, 5, -5]) == 9
  assert sum_nonnegatives([-1, -2, -3]) == 0
output: def sum_nonnegatives(lst):
      return sum(x for x in lst if x >= 0)