input: Write a function to implement a prime number sieve in Python which returns a list of all primes up to a given number. If the input number is less than 2, return an empty list. 
  
  def primeSieve(n): 
      if n < 2:
          return []
      prime_list = [True for i in range(n+1)] 
      p = 2
      while (p * p <= n): 
          if (prime_list[p] == True): 
              for i in range(p * 2, n+1, p): 
                  prime_list[i] = False
          p += 1
      primes = [p for p in range(2, n+1) if prime_list[p]]
      return primes
  
  assert primeSieve(10) == [2, 3, 5, 7]
  assert primeSieve(0) == []
  assert primeSieve(1) == []
  assert primeSieve(20) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert primeSieve(2) == [2]
output: def primeSieve(n): 
      if n < 2:
          return []
      prime_list = [True for i in range(n+1)] 
      p = 2
      while (p * p <= n): 
          if (prime_list[p] == True): 
              for i in range(p * 2, n+1, p): 
                  prime_list[i] = False
          p += 1
      primes = [p for p in range(2, n+1) if prime_list[p]]
      return primes