title: How to find indexes of string in lists which starts with some substring?
body: <p>I have some list like this:</p>
  
  <pre><code>lines = [
      "line",
      "subline2",
      "subline4",
      "line",
  ]
  </code></pre>
  
  <p>And I want to take list of index of lines which starts with some substring.</p>
  
  <p>I use this approach:</p>
  
  <pre><code>starts = [n for n, l in enumerate(lines) if l.startswith('sub')]
  </code></pre>
  
  <p>but maybe anybody knows more beautiful approach?</p>