In Python 3, Zip() is an In-build function in which we pass two list as a argument and it will give or return the dictionary of python.
Basically it take two list and take items of first list as a key and items of second list as a corresponding values
Example -
L1=[1,2,3]
L2=[4,,5,6]
ans= zip(L1,L2)
here ans is become a dictionary In python
Program -
l1=[1,2,3]
l2=[4,5,6]
ans=zip(l1,l2)
print(ans)
print(dict(ans))
l1=[1,2,3,4,5]
l2=[1,2]
ans=zip(l1,l2)
print(dict(ans))
{1: 4, 2: 5, 3: 6}
{1: 1, 2: 2}