title: Start and End Position of symbols in a string
body: <p>I am trying to find the start and end position of <code>_</code> in a string as list of tuples.</p>
  <p>The code I used is</p>
  <pre><code>sentence = 'special events _______ ______ ___ _______ ____ _____ _______ ___________ brochure subscriptions ticket guide'
  symbol = '_'
  
  position = [(match.start(),match.end()) for match in re.finditer(symbol, sentence)]
  </code></pre>
  <p>For this the output obtained is</p>
  <pre><code>[(15, 16), (16, 17), (17, 18), (18, 19), (19, 20)..................]
  </code></pre>
  <p>How to get the start and end position of continuous located symbols as a list of tuple.</p>