Using the sympy.prime () method, we can find the nth prime whose primes are indexed as prime (1) = 2, prime (2) = 3 etc.
Syntax: prime (n)
n - It denotes the nth prime number.
Returns: Returns the nth prime number. p >
Example # 1:
The 5th prime is 11
Example # 2:
The 23rd prime is 83