title: Regex findall start() and end() ? Python
body: <p>i'm trying to get the start and end positions of a query in sequence by using re.findall</p>
  
  <pre><code>import re
  
  sequence = 'aaabbbaaacccdddeeefff'
  
  query = 'aaa'
  
  findall = re.findall(query,sequence)
  
  &gt;&gt;&gt; ['aaa','aaa']
  </code></pre>
  
  <p>how do i get something like findall.start() or findall.end() ? </p>
  
  <p>i would like to get </p>
  
  <pre><code>start = [0,6]
  end = [2,8]
  </code></pre>
  
  <p>i know that </p>
  
  <pre><code>search = re.search(query,sequence)
  
  print search.start(),search.end()
  
  &gt;&gt;&gt; 0,2
  </code></pre>
  
  <p>would give me only the first instance</p>