Created
March 7, 2013 11:18
-
-
Save wwgist/5107382 to your computer and use it in GitHub Desktop.
PYTHON: zipping lists to one 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
letters = ['a', 'b', 'c'] | |
numbers = [1, 2, 3] | |
squares = [1, 4, 9] | |
zipped_list = zip(letters, numbers, squares) | |
# zipped_list = [('a', 1, 1), ('b', 2, 4), ('c', 3, 9)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment