input: Write a function to determine if a number is a prime number and return True if it is, otherwise return False. Create another function that takes a list of integers and returns a sublist consisting of only the prime numbers from the given list.
  
  def is_prime(num):
   for i in range(2, num // 2 + 1):
   if num % i == 0:
   return False
   return True
  
  def prime_list(lst):
   prime_lst = []
   for num in lst:
   if is_prime(num):
   prime_lst.append(num)
   return prime_lst
  
  assert prime_list([2, 8, 3, 6, 10, 7, 14, 11, 17, 15]) == [2, 3, 7, 11, 17]
  assert prime_list([1, 4, 6, 8, 10, 14, 15]) == []
  assert prime_list([2, 3, 5, 7, 11, 13, 17, 19]) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert prime_list([41, 43, 47, 53, 59, 61, 67, 71]) == [41, 43, 47, 53, 59, 61, 67, 71]
  assert prime_list([]) == []
output: def is_prime(num):
      if num <= 1:
          return False
      for i in range(2, int(num**0.5) + 1):
          if num % i == 0:
              return False
      return True
  
  def prime_list(lst):
      prime_lst = []
      for num in lst:
          if is_prime(num):
              prime_lst.append(num)
      return prime_lst