Update group_by.md

This commit is contained in:
Angelos Chalaris
2019-09-22 15:24:39 +03:00
committed by GitHub
parent 99374f1c2e
commit 90d36d46ca

View File

@ -5,7 +5,7 @@ tags: list,object,beginner
Groups the elements of a list based on the given function. Groups the elements of a list based on the given function.
Use `list()` in combination with `map()` and `fn` to map the values of the list to the keys of an object. Use `map()` and `fn` to map the values of the list to the keys of an object.
Use list comprehension to map each element to the appropriate `key`. Use list comprehension to map each element to the appropriate `key`.
```py ```py