Skip to content

Instantly share code, notes, and snippets.

@alexandre-mbm
Created November 12, 2015 19:19
Show Gist options
  • Save alexandre-mbm/28890c1fc6df238f33fa to your computer and use it in GitHub Desktop.
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
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