input: Write a function to construct a prime number sieve in Python which returns a list of all primes up to a given number. If the given number is less than 2, return an empty list. The function should be named primeSieve and take one parameter, n, which is the upper limit for the sieve.
  
  assert primeSieve(10) == [2, 3, 5, 7]
  assert primeSieve(20) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert primeSieve(1) == []
  assert primeSieve(0) == []
  assert primeSieve(2) == [2]
output: def primeSieve(n):
      if n < 2:
          return []
      sieve = [True] * (n + 1)
      sieve[0] = sieve[1] = False
      for i in range(2, int(n**0.5) + 1):
          if sieve[i]:
              for j in range(i*i, n + 1, i):
                  sieve[j] = False
      return [i for i in range(2, n + 1) if sieve[i]]