Want a list of tuples by combining elements of two lists

Submitted 3 years, 6 months ago
Ticket #185
Views 204
Language/Framework Python
Priority High
Status Closed

Consider two lists like:

L1=[13,12,0,29,5]
L2=[19,23,1,29,10]

Now I want the output as:

L3=[(13,19),(12,23),(0,1),(29,29),(5,10)]

How can I get that........

Submitted on Oct 02, 20
add a comment

1 Answer

Verified

L1=[13,12,0,29,5]
L2=[19,23,1,29,10]
print(list(zip(L1, L2)))

This is the required code.......

Submitted 3 years, 6 months ago


Latest Blogs