How to Merge Lists into a List of Tuples? [6 Pythonic Ways]
The most Pythonic way to merge multiple lists l0, l1, …, ln into a list of tuples (grouping together the i-th elements) is to use the zip() function zip(l0, l1, …, ln). If you store your lists in a list of lists lst, write zip(*lst) to unpack all inner lists into the zip function. The … Read more