import itertools numbers = [[1,2,3,4], [5,6,7,8]] flattened = list(itertools.chain.from_iterable(numbers)) print flattened
[1, 2, 3, 4, 5, 6, 7, 8]
No comments:
Post a Comment