GMPY2 adalah prima

gmpy2.is_prime(var)
#must have gmpy2 installed and imported
Lucas Gomes