input: Write a python function to generate a list of prime numbers from a given list.
  assert prime_list([2, 8, 3, 6, 10, 7, 14, 11, 17, 15]) == [2, 3, 7, 11, 17]
  assert prime_list([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [2, 3, 5, 7]
  assert prime_list([13, 17, 19, 21, 23, 24]) == [13, 17, 19, 23]
output: def prime_list(numbers):
      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
      
      return [num for num in numbers if is_prime(num)]