title: Trying to find a command so I can get string (e.g. name) out of a bigger string
body: <p>I've been trying to find a command so I can get the name out of a string formatted like <code>&quot;some string some string &lt;name&gt; some string&quot;</code></p>
  <p>I managed to make a code for this kind of job but if there is a better way, let's say a command for exactly that, I'd be very glad.</p>
  <p>Code example:</p>
  <pre><code>def findName(str):
      indexOne = str.index('&lt;')
      indexTwo = str.index('&gt;')
      resultList = []
  
      for i in str:
          if str.index(i) &gt; indexOne and str.index(i) &lt; indexTwo:
              resultList.append(i)
  
  
  
      return &quot;&quot;.join(resultList)
  </code></pre>