title: Python, divide string into several substrings
body: <p>I have a string of RNA i.e:</p>
  
  <pre><code>AUGGCCAUA
  </code></pre>
  
  <p>I would like to generate all substrings by the following way:</p>
  
  <pre><code>#starting from 0 character
  AUG, GCC, AUA
  #starting from 1 character
  UGG, CCA
  #starting from 2 character
  GGC, CAU
  </code></pre>
  
  <p>I wrote a code that solves the first sub-problem:</p>
  
  <pre><code>for i in range(0,len(rna)):
    if fmod(i,3)==0:
      print rna[i:i+3]
  </code></pre>
  
  <p>I have tried to change the starting position i.e.:</p>
  
  <pre><code> for i in range(1,len(rna)):
  </code></pre>
  
  <p>But it produces me the incorrect results:</p>
  
  <pre><code> GCC, UA #instead of UGG, CCA
  </code></pre>
  
  <p>Could you please give me a hint where is my mistake?</p>