title: ValueError: unconverted data remains:
body: <p>I have a text file with two columns of time values like this:</p>
  
  <p>21:28:07.638502 21:28:07.636</p>
  
  <p>Yes, one column has extra digits for the time.  I'm trying to just read all lines, get the time difference in microseconds ... etc.</p>
  
  <p>If I try something like the following, I would get error.  </p>
  
  <pre><code>import datetime
  format="%H:%M:%S.%f"
  with open(file) as fh:
      for line in fh.readlines():
          line.strip()
          [a,b]=line.split(' ')
          dta=datetime.datetime.strptime(a,format)
          dtb=datetime.datetime.strptime(b,format)
          diff=dta-dtb
          print(diff.microseconds)
  </code></pre>
  
  <p>I'm not sure what the "Unconverted data" comes from.  There's nothing after the "remains:" in the error message. What exactly is data remains?</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/root/.pyenv/versions/3.5.1/lib/python3.5/_strptime.py", line 500, in _strptime_datetime
    tt, fraction = _strptime(data_string, format)
  File "/root/.pyenv/versions/3.5.1/lib/python3.5/_strptime.py", line 340, in _strptime
    data_string[found.end():])
  ValueError: unconverted data remains: 
  </code></pre>