title: python indexing complex list
body: <p>I learned C over last summer, using K&amp;R 2nd ed.  book on C from 1989. I decided then to take CS50, and am now learning python3 for the first time. </p>
  
  <p>I also decided to take a tutorial on python3, online at <a href="http://www.python-course.eu/python3_sequential_data_types.php" rel="nofollow noreferrer">http://www.python-course.eu/python3_sequential_data_types.php</a>,. I'm having some trouble understanding pythons indexing for deeply nested lists.</p>
  
  <p>I've spent a while searching before posting, but did not see the answer. The examples i found online are of this kind: </p>
  
  <pre><code>&gt;&gt;&gt; t = [[100, 'str_1'], [200, 'str_2'], [300, 'str_3']]
  </code></pre>
  
  <p>which i do understand. The indexing is the same as C 2d char array. </p>
  
  <p>What is confusing me is this:</p>
  
  <pre><code>place= ["High up", ["further down", ["and down", ["deep down", "the answer", 42]]]]
  
  &gt;&gt;&gt; place[0]
  'High up'
  &gt;&gt;&gt; place[1]
  ['further down', ['and down', ['deep down', 'the answer', 42]]]
  &gt;&gt;&gt; place[1][1]
  ['and down', ['deep down', 'the answer', 42]]
  &gt;&gt;&gt; place[1][1][1]
  ['deep down', 'the answer', 42]
  &gt;&gt;&gt; place[1][1][1][0]
  'deep down'
  &gt;&gt;&gt; place[1][1][1][0][3]
  'p'
  </code></pre>
  
  <p>I thought i got it, just keep going over one, to get to the next list, but then i found this.</p>
  
  <pre><code>&gt;&gt;&gt; complex_list = [["a",["b",["c","x"]]],42]
  complex_list[0]   #note: index 0 is the entire left, while above it's not.*
  ['a', ['b', ['c', 'x']]]
  &gt;&gt;&gt; complex_list[0][1]
  ['b', ['c', 'x']]
  &gt;&gt;&gt; complex_list[0][1][1][0]
  'c'
  </code></pre>
  
  <p>The two list look almost the same to me, except that complex_list has two braces on the left.
  Can someone explain the rule to me, I don't see why place[0] is only the first item in the list, while complex_list[0] is the entire list except for the number 42? How does that extra brace change the indexing?</p>