input: Write a function to filter out a list of numbers and keep only those that are prime. If the list is empty, return an empty list.
  def filter_prime(nums):
      if not nums:
          return []
      primes = []
      for num in nums:
          if num > 1:
              for i in range(2, num):
                  if num % i == 0:
                      break
              else:
                  primes.append(num)
      return primes
  
  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([71, 72, 73, 74, 75]) == [71, 73]
  assert filter_prime([]) == []
  assert filter_prime([17, 19, 21, 23, 24]) == [17, 19, 23]
output: def filter_prime(nums):
      if not nums:
          return []
      primes = []
      for num in nums:
          if num > 1:
              for i in range(2, num):
                  if num % i == 0:
                      break
              else:
                  primes.append(num)
      return primes