title: How can I get 2 characters from the middle of a string?
body: <pre class="lang-py prettyprint-override"><code>import time
  
  date = time.strftime("%d:%m:%y")
  
  
  print date #returns '18:05:14'
  
  print date[-2:] #returns '14'
  
  print date[:2] #returns '18'
  
  #print ??? &lt;-returns '05'
  </code></pre>
  
  <p>How can I (preferably) use the [:<em>number</em>:] thing to look for the 4th and 5th character ONLY of "18:05:14" (05)? if i can't use [:#], that's fine. I can't find any possible way, but any help is appreciated.</p>