Created
May 11, 2020 20:38
-
-
Save essamamdani/1c31d7f44680d3edce913b9f73d8732d to your computer and use it in GitHub Desktop.
zip method using longest property
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
import itertools | |
lst1 = [1,2,3,4,5] | |
lst2=["banana","apple","mango","berry"] | |
lst3=["black","red"] | |
for (a, b, c) in itertools.zip_longest(lst1, lst2, lst2): | |
print (a, b, c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment