input: Write a function to extract all prime numbers from a given list of integers. Define a helper function to check if a number is prime. Return the list of prime numbers. If the input list is empty, return an empty list.
  
  def is_prime(num):
      for i in range(2, num // 2 + 1):
          if num % i == 0:
              return False
      return True
  
  def prime_list(lst):
      prime_lst = []
      for num in lst:
          if is_prime(num):
              prime_lst.append(num)
      return prime_lst
  
  assert prime_list([2, 8, 3, 6, 10, 7, 14, 11, 17, 15]) == [2, 3, 7, 11, 17]
  assert prime_list([]) == []
  assert prime_list([4, 6, 8, 9, 10]) == []
  assert prime_list([5, 7, 11, 13, 17]) == [5, 7, 11, 13, 17]
output: def is_prime(num):
      if num <= 1:
          return False
      for i in range(2, int(num**0.5) + 1):
          if num % i == 0:
              return False
      return True
  
  def prime_list(lst):
      prime_lst = []
      for num in lst:
          if is_prime(num):
              prime_lst.append(num)
      return prime_lst