title: python: random.random in function always returns 0?
body: <p>I have this function:</p>
  
  <pre><code>def get_starting_centroids(centroids,size,num):
      for i in range(0,num):
          temp = []
          for j in range(0,size):
              random.seed(time.clock())
              g = random.random()
              g = g*.85 + .15
              print "random: %i" %g
              temp.append(g)
          centroids.append(temp)
      return centroids
  </code></pre>
  
  <p>print tells me it always returns 0. If I test <code>random.random()</code> in the python prompt I get a random value. I don't understand what causes this difference</p>