Apply suggestions from code review

Co-Authored-By: Isabelle Viktoria Maciohsek <maciv@hotmail.gr>
This commit is contained in:
Angelos Chalaris
2020-03-16 22:00:46 +02:00
committed by GitHub
parent d5878dbb14
commit 82d99f98cb
2 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,8 @@ title: map_object
tags: list,intermediate
---
Maps the values of a list to a dictionary using a function, where the key-value pairs consist of the value as the key and the mapped value.
Maps the values of a list to a dictionary using a function, where the key-value pairs consist of the original value as the key and the result of the function as the value.
Use a `for` loop to iterate over the list's values, assigning the values produced by `fn` to each key of the dictionary.