title: String indexing - Why S[0][0] works and S[1][1] fails?
body: <p>Suppose I create a string:</p>
  
  <pre><code>&gt;&gt;&gt; S = "spam"
  </code></pre>
  
  <p>Now I index it as follows:</p>
  
  <pre><code>&gt;&gt;&gt; S[0][0][0][0][0]
  </code></pre>
  
  <p>I get output as:</p>
  
  <pre><code>&gt;&gt;&gt; 's'
  </code></pre>
  
  <p>But when i index it as:</p>
  
  <pre><code>&gt;&gt;&gt; S[1][1][1][1][1]
  </code></pre>
  
  <p>I get output as:</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;pyshell#125&gt;", line 1, in &lt;module&gt;
  L[1][1][1][1][1]
  IndexError: string index out of range
  </code></pre>
  
  <p>Why is the output not <strong>'p'</strong>?</p>
  
  <p>Why also it is working for <strong>S[0][0]</strong> or <strong>S[0][0][0]</strong> or <strong>S[0][0][0][0]</strong> and not for <strong>S[1][1]</strong> or <strong>S[1][1][1]</strong> or <strong>S[1][1][1][1]</strong>?</p>