Created
October 21, 2022 15:23
-
-
Save mh0w/906f41fcfbfea877661f71ebfab22037 to your computer and use it in GitHub Desktop.
convert two list to a list of tuples
This file contains hidden or 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 = [4,5,6] | |
print(list(zip(l1, l2))) #[(1, 4), (2, 5), (3, 6)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment