Weird Python code results
<p>Can I anyone tell me why the following code generates such results?</p>

<pre><code>def weird(s):
    print s

    for ii in range(len(s)):
        for jj in range(ii, len(s)+1):
            print ii, jj

    return

if __name__=="__main__":
   ss="acaacb"
   weird(ss)
</code></pre>

<p>results:</p>

<pre><code>acaacb
0 0
0 1
0 2
0 3
0 4
0 5
0 6
</code></pre>

<p>Should the value of <em>ii</em> iterate through 0 to 5? </p>
