input: Write a function to return a sublist consisting of the prime numbers from a given list of integers. The function should include a helper function to check if a number is prime. If the given list is empty then return an empty list.
  assert is_prime(2)==True
  assert is_prime(4)==False
  assert prime_list([2, 8, 3, 6, 10, 7, 14, 11, 17, 15])==[2, 3, 7, 11, 17]
  assert prime_list([])==[]
output: def is_prime(n):
      if n <= 1:
          return False
      for i in range(2, int(n**0.5) + 1):
          if n % i == 0:
              return False
      return True
  
  def prime_list(lst):
      return [num for num in lst if is_prime(num)]