I currently have ↓ set as my randprime(p,q) function. Is there any way to condense this, via something like a genexp or listcomp?
n = randint(p, q)while not isPrime(n): n = randint(p, q)
Aucun commentaire:
Enregistrer un commentaire