title: how do you split a list into 3 lists, for each list in a list? Python Beginner
body: <pre><code>list1= [[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9]]
  </code></pre>
  <p>Result should be:</p>
  <pre><code>list2 = [[1,2,3],[4,5,6],[7,8,9],[1,2,3],[4,5,6],[7,8,9],[1,2,3],[4,5,6],[7,8,9]]
  </code></pre>
  <p>This should work for any list divisible by 3 as well.</p>
  <pre><code>list1 = [1,2,3,4,5,6,7,8,9]
  </code></pre>
  <p>Result:</p>
  <pre><code>list2 = [[1,2,3],[4,5,6],[7,8,9]]
  </code></pre>
  <p>I tried using:</p>
  <pre><code>list2 = [list1[i:i + n] for i in range(0,len(list1),n)]
  </code></pre>
  <p>No luck.</p>