random.py 163 B

1234567
  1. def shuffle(L):
  2. for i in range(len(L)):
  3. j = randint(i, len(L) - 1)
  4. L[i], L[j] = L[j], L[i]
  5. def choice(L):
  6. return L[randint(0, len(L) - 1)]