title: How do I shift the decimal place in Python?
body: <p>I'm currently using the following to compute the difference in two times. The out - in is very fast and thus I do not need to display the hour and minutes which are just 0.00 anyway. How do I actually shift the decimal place in Python? </p>
  
  <pre><code>def time_deltas(infile): 
      entries = (line.split() for line in open(INFILE, "r")) 
      ts = {}  
      for e in entries: 
          if " ".join(e[2:5]) == "OuchMsg out: [O]": 
              ts[e[8]] = e[0]    
          elif " ".join(e[2:5]) == "OuchMsg in: [A]":    
              in_ts, ref_id = e[0], e[7] 
              out_ts = ts.pop(ref_id, None) 
              yield (float(out_ts),ref_id[1:-1], "%.10f"%(float(in_ts) - float(out_ts)))
  
  INFILE = 'C:/Users/kdalton/Documents/Minifile.txt'
  print list(time_deltas(INFILE))
  </code></pre>