input: Write a function to calculate the average of a list of positive integers and output the result. If the given list is empty then return 0.
  assert average_positive_integers([1, 5, 6, 7, 8])==5.4
  assert average_positive_integers([10, 20, 30, 40])==25.0
  assert average_positive_integers([1])==1.0
  assert average_positive_integers([])==0
  assert average_positive_integers([5, 15])==10.0
output: def average_positive_integers(lst):
      if not lst:
          return 0
      return sum(lst) / len(lst)