Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@essamamdani
Created May 11, 2020 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save essamamdani/0b7cf34d77c26edf199895aafe519e64 to your computer and use it in GitHub Desktop.
Save essamamdani/0b7cf34d77c26edf199895aafe519e64 to your computer and use it in GitHub Desktop.
iterates over multiple lists through one variable.
import itertools
lst1 = [1,2,3,4,5]
lst2=["banana","apple","mango","berry"]
lst3=["black","red"]
for (a) in zip(lst1, lst2, lst3):
print (a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment