title: efficient way to get string between the two words
body: <p>I have a list of strings as:</p>
  <pre><code>strings= ['stackasdf:5;iwantthis123jasdoverflow','iwantthistoo','asdf:5;python123jasd']
  </code></pre>
  <p>Now, I want to print strings both in between two substrings<code>(start=asdf:5; end=123jasd)</code> and which are not.</p>
  <p>output expected:</p>
  <pre><code>iwantthis
  iwantthistoo
  python
  </code></pre>
  <p>What I've done is:</p>
  <pre><code>import re
  start = 'asdf:5;'
  end = '123jasd'
  for i in strings:
      t=i[len(start):-len(end)]
      if t:
          print (t)
      else:
          print (i)
  
  df:5;iwantthis123jasdo 
  iwantthistoo 
  python
  </code></pre>
  <p>I'm not getting the desired output as expected.</p>