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.
More Related Contents:
- how to unpack a tuple in this form (‘abc’, [20, 20])? [closed]
- What’s the difference between lists and tuples?
- Sort a list of tuples by 2nd item (integer value) [duplicate]
- Why can’t I use a list as a dict key in python?
- How to extract the n-th elements from a list of tuples
- Why can tuples contain mutable items?
- How to convert comma-delimited string to list in Python?
- List vs tuple, when to use each? [duplicate]
- Convert tuple to list and back
- Unpacking a list / tuple of pairs into two lists / tuples
- Subtracting 2 lists in Python
- Accessing a value in a tuple that is in a list
- Explicitly select items from a list or tuple
- How to convert a list to a list of tuples?
- Tuple or list when using ‘in’ in an ‘if’ clause?
- Why is tuple faster than list in Python?
- How to convert nested list of lists into a list of tuples in python 3.3?
- What’s the difference between lists enclosed by square brackets and parentheses in Python?
- Convert a columns of string to list in pandas
- How to flatten a tuple in python
- Why can’t I use a list as a dict key in python? Exactly what can and cannot be used, and why?
- Does Python have an immutable list?
- Swap values in a tuple/list inside a list in python?
- python – get list of tuples first index?
- How does str.startswith really work?
- Concatenate elements of a tuple in a list in python [duplicate]
- Filter a list of tuples based on condition
- How can I convert this string to list of lists? [duplicate]
- In what case would I use a tuple as a dictionary key? [closed]
- Converting string to tuple without splitting characters