input: Write a function to determine if a number is prime and use it to create another function that returns a list of prime numbers from a given list of integers. The function should be called `prime_list` and it should take a list of integers as input. If the list is empty, the function should return an empty list.
  assert prime_list([2, 8, 3, 6, 10, 7, 14, 11, 17, 15]) == [2, 3, 7, 11, 17]
  assert prime_list([4, 6, 8, 9, 10]) == []
  assert prime_list([5, 13, 17, 29, 31]) == [5, 13, 17, 29, 31]
  assert prime_list([]) == []
  assert prime_list([1]) == []
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)]