input: Write a function to rewrite the given code snippet to find prime numbers using Python. The function should return a list of prime numbers up to the given limit 'n'. 
  
  def find_primes(n):
      def is_prime(num):
          for i in range(2, int(num ** 0.5) + 1):
              if num % i == 0:
                  return False
          return True if num > 1 else False
      
      primes = []
      for num in range(n + 1):
          if is_prime(num):
              primes.append(num)
      return primes
  
  assert find_primes(10) == [2, 3, 5, 7]
  assert find_primes(19) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert find_primes(1) == []
output: def find_primes(n):
      def is_prime(num):
          for i in range(2, int(num ** 0.5) + 1):
              if num % i == 0:
                  return False
          return True if num > 1 else False
      
      primes = []
      for num in range(n + 1):
          if is_prime(num):
              primes.append(num)
      return primes