Skip to content

Instantly share code, notes, and snippets.

@leopard627
Created January 30, 2019 16:12
Show Gist options
  • Save leopard627/b6ae1c629bec36959485ba599c0e5648 to your computer and use it in GitHub Desktop.
Save leopard627/b6ae1c629bec36959485ba599c0e5648 to your computer and use it in GitHub Desktop.
zipper
e = ["a", "b", "c"]
f = [1, 2, 3]
zip(e, f)
# <zip at 0x10a37af08>
dict(e, f)
# {'a': 1, 'b': 2, 'c': 3}
dict(zip(["a", "b", "c"], [11, 22, 33]))
# {'a': 11, 'b': 22, 'c': 33}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment