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