Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
random_derangement
1 parent bbe00d5 commit c117b03Copy full SHA for c117b03
1 file changed
Doc/library/random.rst
@@ -666,7 +666,7 @@ or the :pypi:`more-itertools` project:
666
"Choose a permutation where no element is in its original position."
667
seq = tuple(iterable)
668
if len(seq) < 2:
669
- raise ValueError('derangments require at least two values')
+ raise ValueError('derangements require at least two values')
670
perm = list(seq)
671
while True:
672
random.shuffle(perm)
0 commit comments