Created
November 12, 2015 19:19
-
-
Save alexandre-mbm/28890c1fc6df238f33fa to your computer and use it in GitHub Desktop.
Shows how to map a array in other and creating a dict
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
words = ['um','dois','três','quatro','cinco'] | |
numbers = [1,2,3] | |
def maptest(word, number): | |
return (word, number) | |
result = dict(map(maptest, words, numbers)) | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment