title: How to flatmap list of lists of lists of tuples in Python?
body: <p>I am using Calendar and recieve list of lists of lists of tuples from it</p>
  
  <pre><code>calendar.Calendar.yeardays2calendar(calendar.Calendar(), year, 1))
  </code></pre>
  
  <p>Output is: </p>
  
  <pre><code>[[[[(0, 0), (0, 1), (0, 2), (1, 3), (2, 4), (3, 5), (4, 6)], [(5, 0), (6, 1), (7, 2), (8, 3), (9, 4), (10, 5), (11, 6)], [(12, 0), (13, 1),...
  </code></pre>
  
  <p>I want to flat map it to simple tuples list saving their order. What is the best way to do map list of any deepness into plain list in python 2.7? </p>
  
  <p>Example of what I want:</p>
  
  <pre><code>[(0, 0), (0, 1), (0, 2), (1, 3), (2, 4), (3, 5), (4, 6),(5, 0), (6, 1), (7, 2), (8, 3), (9, 4), (10, 5), (11, 6), (12, 0), (13, 1)...
  </code></pre>
  
  <p>Tryied code from other questions - didn't help. Sorry for silly questions, I'm new to python</p>
  
  <p>UPD I tried functions from here <a href="https://stackoverflow.com/questions/1077015/python-list-comprehensions-compressing-a-list-of-lists">python list comprehensions; compressing a list of lists?</a> - didn't help</p>