Zip with list output instead of tuple

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.

Leave a Comment