title: How do I predict the output of Python's random number generator?
body: <p>Here is my code</p>
  <pre><code>from random import randint
  
  print(randint(0,9))
  </code></pre>
  <p>Now I want to know which number it will generate if run this code. What is the algorithm behind it?</p>
  <p>Is there a way I can change it.</p>
  <p>If that does not work, then let me ask something different</p>
  <pre><code>from random import randint
  for i in range(10):
      print(randint(0,9)) 
  </code></pre>
  <p>Let's take this example. This will print 10 random numbers</p>
  <p><code>list[2,1,4,5,2,4,5,2,1,5]</code></p>
  <p>If I know 9 numbers in the above list, is there a way to know the 10th number for that instance?</p>