title: How to extract time from string in Python
body: <p>I am developing a program and I am trying to find the time in the string.
  Time format should be military format. like,</p>
  <pre><code>10:30 or 23:20
  </code></pre>
  <p>An example:</p>
  <pre><code>a = 'set reminder for 10:45'
  b = 'set reminder for 17:50'
  </code></pre>
  <p>And the results should be like that,</p>
  <pre><code>a = '10:45'
  b = '17:50'
  </code></pre>
  <p>How to achieve these results? Using <code>re</code> doesn't make sense to me, since if we get before and after this <code>:</code> sign and there is another <code>:</code> sign, wouldn't we get an error?</p>