update readme.py
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
### count_occurences
|
||||
|
||||
:information_source: Already implemented via `list.count()`.
|
||||
|
||||
Counts the occurrences of a value in an list.
|
||||
|
||||
Uses the `reduce` functin from built-in module `functools` to increment a counter each time you encounter the specific value inside the list.
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
### shuffle
|
||||
|
||||
:information_source: The same algorithm is already implemented via `random.shuffle`.
|
||||
|
||||
Randomizes the order of the values of an list, returning a new list.
|
||||
|
||||
Uses the [Fisher-Yates algorithm](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle) to reorder the elements of the list.
|
||||
|
||||
Reference in New Issue
Block a user