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 b0267b3 commit 00252ccCopy full SHA for 00252cc
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