title: python reading from string and setting variable
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/466345/converting-string-into-datetime">Converting string into datetime</a>  </p>
  </blockquote>
  
  
  
  <p>Example '12:00:01 AM'</p>
  
  <p>I want to set variables : hr = 12, min= 00,s= 01,t = AM</p>
  
  <p>Please help me out to compare time , I comparing ( example: 1:10:00 PM &lt; '12:00:01 AM')</p>
  
  <p>With &lt; sign result produced is not always correct.</p>
  
  <p>So I am trying developing code to compare time by setting variable</p>
  
  <p>But it could be directly available by any function please let me know</p>
  
  <p>Otherwise please help me out to set variables</p>