diff --git a/snippets/map_dictionary.md b/snippets/map_dictionary.md index f64de87e2..8aea5842d 100644 --- a/snippets/map_dictionary.md +++ b/snippets/map_dictionary.md @@ -5,9 +5,9 @@ tags: list,intermediate 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 `map` to apply `fn` to each value of the list. -- Use `zip` to pair original values to the values produced by `fn`. -- Use `dict` to return a key value pair. +- Use `map()` to apply `fn` to each value of the list. +- Use `zip()` to pair original values to the values produced by `fn`. +- Use `dict()` to return an appropriate dictionary. ```py def map_dictionary(itr, fn):