input: Write a python function to find prime numbers within a given range.
  assert prime_nums(10, 25) == [11, 13, 17, 19, 23]
  assert prime_nums(2, 10) == [2, 3, 5, 7]
  assert prime_nums(30, 40) == [31, 37]
output: def prime_nums(start, end):
      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 = [num for num in range(start, end + 1) if is_prime(num)]
      return primes