title: Random prime Number in python
body: <p>I currently have ↓ set as my <code>randprime(p,q)</code> function. Is there any way to condense this, via something like a <strong>genexp</strong> or <strong>listcomp</strong>? Here's my function:</p>
  
  <pre><code>n = randint(p, q)
  while not isPrime(n):
      n = randint(p, q)
  </code></pre>