input: Write a function to implement the Sieve of Eratosthenes algorithm to find all prime numbers up to a given number n. The function should return a list of prime numbers. If n is less than 2, the function should return an empty list.
  def sieve_eratosthenes(n):
      if n < 2:
          return []
      prime_list = [True] * (n+1)
      prime_list[0] = False
      prime_list[1] = False
      primes = []
      
      for i in range(2, n+1):
          if prime_list[i] == True:
              primes.append(i)
              for j in range(i*i, n+1, i):
                  prime_list[j] = False
      return primes
  
  assert sieve_eratosthenes(10) == [2, 3, 5, 7]
  assert sieve_eratosthenes(20) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert sieve_eratosthenes(1) == []
  assert sieve_eratosthenes(0) == []
  assert sieve_eratosthenes(100) == [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
output: def sieve_eratosthenes(n):
      if n < 2:
          return []
      prime_list = [True] * (n+1)
      prime_list[0] = False
      prime_list[1] = False
      primes = []
      
      for i in range(2, n+1):
          if prime_list[i] == True:
              primes.append(i)
              for j in range(i*i, n+1, i):
                  prime_list[j] = False
      return primes