Example & Tutorial understanding programming in easy ways.

What is the use of the zip() function in Python ?

zip() are use for combine the things.

like:

l1=[1,2,3]

l2=[4,5,6]

d=zip(l1,l2)

print(type(d))

print(*d)

output:

<class 'zip'>

(1, 4) (2, 5) (3, 6)


Read More →