Suggests using builtin functions for median, sample, shuffle, split_lines and zip
This commit is contained in:
@ -7,6 +7,8 @@ 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.
|
||||
|
||||
[`random.shuffle`](https://docs.python.org/3/library/random.html#random.shuffle) provides similar functionality to this snippet.
|
||||
|
||||
```py
|
||||
from copy import deepcopy
|
||||
from random import randint
|
||||
|
||||
Reference in New Issue
Block a user