input: Write a python function to generate a list of prime numbers up to a given maximum number.
  assert generate_prime_list(10) == [2, 3, 5, 7]
  assert generate_prime_list(20) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert generate_prime_list(50) == [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
output: def generate_prime_list(max_num):
      def is_prime(n):
          if n <= 1:
              return False
          for i in range(2, int(n**0.5) + 1):
              if n % i == 0:
                  return False
          return True
  
      primes = []
      for num in range(2, max_num + 1):
          if is_prime(num):
              primes.append(num)
      return primes