title: Python random generator not so random?
body: <p>Is the python random generator considered "good"? As in, does it simulate randomness very well? I made a small program which simulates a person starting at (0, 0) and taking a random step either east, west, north and south. As you run simulations with larger and larger number of steps, you would expect the final position of the person to be closer and closer to the origin. However, as I increased the number of steps in my simulation, the final position was getting farther and farther away from the origin. The program I used is here:</p>
  
  <pre><code>import random
  
  def walk():
      north = 0
      east = 0
      for i in range(10000):
          direction = random.randint(0, 100)
      if direction &lt;= 25:
          north = north + 1
      elif direction &gt; 25 and direction &lt;= 50:
          north = north - 1
      elif direction &gt; 50 and direction &lt;= 75:
          east = east + 1
      else:
          east = east - 1
  return north, east
  
  
  
  def main():
      for i in range(500):
          north, east = walk()
          print("NE : ", north, east)
  
  
  main()        
  </code></pre>