input: Write a function to filter out a list of numbers and keep only those that are prime. The function should accept a list of integers as input and return a list of integers containing only the prime numbers. If the input list is empty, the function should return an empty list.
  assert filter_prime([2, 3, 4, 5, 6, 7, 8, 9, 10])==[2, 3, 5, 7] 
  assert filter_prime([11, 12, 13, 14, 15])==[11, 13] 
  assert filter_prime([16, 17, 18, 19, 20])==[17, 19] 
  assert filter_prime([1, 4, 6, 8, 9, 10])==[] 
  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)]