title: Python current time comparison with other time
body: <p>I am looking for a comparison of two times in Python. One time is the real time from computer and the other time is stored in a string formatted like <code>"01:23:00"</code>.</p>
  
  <pre><code>import time
  
  ctime = time.strptime("%H:%M:%S")   # this always takes system time
  time2 = "08:00:00"
  
  if (ctime &gt; time2):
      print("foo")
  </code></pre>