input: Write a function to filter out a list of numbers and keep only those that are prime. If the given list is empty then return an empty list.
  assert filter_prime([2, 3, 4, 5, 6, 7, 8, 9, 10])==[2, 3, 5, 7]
  assert filter_prime([11, 13, 14, 15, 16, 17, 18])==[11, 13, 17]
  assert filter_prime([23, 24, 25, 26, 27, 28, 29])==[23, 29]
  assert filter_prime([])==[]
output: def filter_prime(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)]