input: Write a function to rewrite the given code snippet to find prime numbers using Python. The function should take an integer n as input and print all prime numbers between 2 and 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
  
      for num in range(2, n + 1):
          if is_prime(num):
              print(num)
  
  assert find_primes(2) == print(2)
  assert find_primes(7) == print(2, 3, 5, 7)
  assert find_primes(11) == print(2, 3, 5, 7, 11)
  assert find_primes(15) == print(2, 3, 5, 7, 11, 13)
  assert find_primes(1) == print("")
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
  
      for num in range(2, n + 1):
          if is_prime(num):
              print(num)