input: Write a python function to find all prime numbers up to a given number.
  assert prime_numbers(10) == [2, 3, 5, 7]
  assert prime_numbers(20) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert prime_numbers(30) == [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
output: def prime_numbers(n):
      def is_prime(k):
          if k < 2:
              return False
          for i in range(2, int(k ** 0.5) + 1):
              if k % i == 0:
                  return False
          return True
      
      return [x for x in range(2, n + 1) if is_prime(x)]