Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created July 21, 2020 03:16
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 IndhumathyChelliah/c012990107a231c7dea9c21acec3014b to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/c012990107a231c7dea9c21acec3014b to your computer and use it in GitHub Desktop.
l1=['red','green','blue']
l2=[0,1,2]
l3=[(n1,n2) for n1,n2 in zip(l1,l2)]
print (l3)#Output:[('red', 0), ('green', 1), ('blue', 2)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment