Skip to content

Instantly share code, notes, and snippets.

@mh0w
Created October 21, 2022 15:23
Show Gist options
  • Save mh0w/906f41fcfbfea877661f71ebfab22037 to your computer and use it in GitHub Desktop.
Save mh0w/906f41fcfbfea877661f71ebfab22037 to your computer and use it in GitHub Desktop.
convert two list to a list of tuples
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