All Questions
1 question
0
votes
0
answers
28
views
Flattening multiple nested lists in Python [duplicate]
I already know lots of methods using which you can flatten list of lists.
For example :
Method 1:
A = [[1, 2], [3, 4], [5, 6]]
print sum(A, [])
Method 2
from itertools import chain
print list((...