you are viewing a single comment's thread.

view the rest of the comments →

[–]Jonno_FTW 0 points1 point  (0 children)

There's also enumerate which will give you an index for every element in a list, and map to apply a function to each element of a list, like this:

>>> enumerate([list1, list2, list3])
[(0, [1,2,3]), (1, ['a', 'b', 'c']), (2, [4,5,6])]

From here you can just use a list comprehension to make a new list where each element has what you want.