Apply new format to snippets and template
This commit is contained in:
@ -5,7 +5,7 @@ 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 a `for` loop to iterate over the list's values, assigning the values produced by `fn` to each key of the dictionary.
|
||||
- Use a `for` loop to iterate over the list's values, assigning the values produced by `fn` to each key of the dictionary.
|
||||
|
||||
```py
|
||||
def map_dictionary(itr, fn):
|
||||
|
||||
Reference in New Issue
Block a user