title: Converting seconds to milliseconds/microseconds in Python
body: <p>I'm trying to convert seconds to milliseconds (or microseconds) without dividing by 1,000 or 1,000,000. The reason I'm doing it is because I don't want the decimal point to be shown. Is there a way of showing milliseconds or microseconds without the decimal point and without dividing by 1,000 or 1,000,000?  </p>
  
  <p>Here's my code with method execution timing:  </p>
  
  <pre><code>from random import randint
  list = [1]*1000
  
  for i in range (1, 1000):
      list[i] = randint(1,100)
  
  def insertion(list):
      for index in range(1,len(list)):
          value = list[index]
          i = index - 1
          while i&gt;=0 and (value &lt; list[i]):
              list[i+1] = list[i] 
              list[i] = value
              i = i - 1
  
  def test():
      start = time.clock()
      insertion(list)
      elapsed = (time.clock() - start)
      print "Time taken for insertion = ", elapsed
  
  if __name__ == '__main__':
      import time
      test()
  </code></pre>