-
-
Save IndhumathyChelliah/94a51b6141d7a1edab7435540eaf8844 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l1=[1,2,3] | |
l2=['a','b','c' | |
#zip() returns an iterator | |
z=zip(l1,l2) | |
print (z)#Output:<zip object at 0x02DB94E8> | |
#Accessing elements in the iterator using next() function. | |
print (next(z))#Output:(1, 'a') | |
print (next(z))#Output:(2, 'b') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment