I am using Calendar and recieve list of lists of lists of tuples from it
calendar.Calendar.yeardays2calendar(calendar.Calendar(), year, 1))
Output is:
[[[[(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),...
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?
Example of what I want:
[(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)...
Tryied code from other questions - didn't help. Sorry for silly questions, I'm new to python
UPD I tried functions from here python list comprehensions; compressing a list of lists? - didn't help