I want to understand function from random.py: Why the last line looks so?
def shuffle(self, x, random=None, int=int):
randbelow = self._randbelow
for i in reversed(range(1, len(x))):
# pick an element in x[:i+1] with which to exchange x[i]
j = randbelow(i+1) if random is None else int(random() * (i+1))
x[i], x[j] = x[j], x[i]
Why it's not single:
x[j] = x[j]