input: Write a function to construct a prime number sieve in Python which returns a list of all primes up to a given number n.
  assert primeSieve(10) == [2, 3, 5, 7]
  assert primeSieve(20) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert primeSieve(2) == [2]
  assert primeSieve(1) == []
  assert primeSieve(0) == []
output: def primeSieve(n):
      if n < 2:
          return []
      sieve = [True] * (n + 1)
      sieve[0] = sieve[1] = False
      for start in range(2, int(n**0.5) + 1):
          if sieve[start]:
              for multiple in range(start*start, n + 1, start):
                  sieve[multiple] = False
      return [num for num, is_prime in enumerate(sieve) if is_prime]