I recently found out about Python's zip()
function. Another way to do what I want to do here is:
list( zip( *a )[0] )
tup_list = zip( list1, list2 )
interleaves two lists into a list of 2-tuples, but zip( *tup_list )
does the opposite, resulting in a list of a tuple of list1
and a tuple of list2
.