If you are zipping more than 2 lists (or even only 2, for that matter), a readable way would be:
[list(a) for a in zip([1,2,3], [4,5,6], [7,8,9])]
This uses a list comprehension to apply list
to each element (tuple) in the list, converting them into lists.
More Related Contents:
- Is there a zip-like function that pads to longest length?
- Pairs from single list
- How to zip two lists of lists
- how to unpack a tuple in this form (‘abc’, [20, 20])? [closed]
- Pandas column of lists, create a row for each list element
- What is the difference between `sorted(list)` vs `list.sort()`?
- How can I get list of values from dict?
- Converting a string representation of a list into an actual list object [duplicate]
- Apply function to each element of a list
- Python list rotation [duplicate]
- List on python appending always the same value [duplicate]
- Why does ‘.sort()’ cause the list to be ‘None’ in Python? [duplicate]
- Python’s insert returning None?
- Download Returned Zip file from URL
- Convert NumPy array to Python list
- why sum on lists is (sometimes) faster than itertools.chain?
- appending list but error ‘NoneType’ object has no attribute ‘append’ [duplicate]
- Get number of items from list (or other iterable) with certain condition
- How to append multiple values to a list in Python
- How to remove square brackets from list in Python? [duplicate]
- accepting multiple user inputs separated by a space in python and append them to a list
- Unexpected list behavior in Python
- Why do these list operations (methods: clear / extend / reverse / append / sort / remove) return None, rather than the resulting list?
- Comprehension on a nested iterables?
- Sliding window maximum in O(n) time
- Why do these list methods (append, sort, extend, remove, clear, reverse) return None rather than the resulting list?
- Sorting list according to corresponding values from a parallel list [duplicate]
- How do I set permissions (attributes) on a file in a ZIP file using Python’s zipfile module?
- Does Python have an immutable list?
- Nested lambda statements when sorting lists