By far the fastest (and shortest) solution posted:
list(sum(output, ()))
About 50% faster than the itertools solution, and about 70% faster than the map solution.
By far the fastest (and shortest) solution posted:
list(sum(output, ()))
About 50% faster than the itertools solution, and about 70% faster than the map solution.