title: Checkio long repeat challenge
body: <p>In the challenge you are asked to find the length of the longest substring that consists of the same letter. For example, line &quot;aaabbcaaaa&quot; contains four substrings with the same letters &quot;aaa&quot;, &quot;bb&quot;,&quot;c&quot; and &quot;aaaa&quot;. The last substring is the longest one which makes it an answer. Input: String. Output: Int. Example:</p>
  <blockquote>
  <p>long_repeat('sdsffffse') == 4</p>
  <p>long_repeat('ddvvrwwwrggg') == 3</p>
  </blockquote>
  <p>Here is my code :</p>
  <pre><code>def long_repeat(text):
      text = list(text)
      counter = []
      c = []
  
      for i in range(len(text)):
          if text[0] == text[1]:
              c.append(text.pop(0))
          else:
              counter.append(c)
              c = []
      print text # should be empty 
      print counter # should contain a lists of the repeated letters
  </code></pre>
  <p>Output:</p>
  <pre><code>&gt;&gt;&gt;long_repeat('aaabbccc')
  ['a', 'b', 'b', 'c', 'c', 'c', 'c']
  [['a', 'a'], [], [], [], [], [], []]
  </code></pre>
  <p>why the loop stopes when it finishes the first letter which is 'a' in this case?</p>