title: How to generate a new random number in python without running the program again or add up new variable?
body: <p>For so far, I've learnt how to use <code>randrange()</code> and <code>choice.random()</code> to generate random number. But there is something confusing me, that everytime I can only generate a fixed random number, like:</p>
  
  <pre><code>import random
  
  x = [1,2,3,4]
  
  chance = random.choice(x)
  
  while chance &lt; 5:
      print chance
  </code></pre>
  
  <p>At this example, the random number generate by chance is fixed. If I want to generate a new random number, I have to run this program again or to add up a new variable.</p>
  
  <p>is there a method, that I can build something which I use it to generate new random numbers without to run the program again or add up a new variable?</p>
  
  <p>Thank you very much! </p>