Let's assume that I have the following three lists (l1, l2, l3). How can I create a new list where each element is a tuple of elements of the lists (l_desired)? It actually works as an extended version of the zip method in python.
In simpler words, given l1, l2, l3
, how can I create l_desired
?
l1 = [1,2,3]
l2 = ['a', 'b', 'c']
l3 = ['Jess', 'Muss']
l_desiered = [(1, 'a', 'Jess'), (1, 'b', 'Jess'), (1, 'c', 'Jess'),
(1, 'a', 'Muss'), (1, 'b', 'Muss'), (1, 'c', 'Muss'),
(2, 'a', 'Jess'), (2, 'b', 'Jess'), (2, 'c', 'Jess'), ...]
`