mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
14 lines
270 B
Python
14 lines
270 B
Python
_inst = Random()
|
|
|
|
seed = _inst.seed
|
|
random = _inst.random
|
|
uniform = _inst.uniform
|
|
randint = _inst.randint
|
|
|
|
def shuffle(L):
|
|
for i in range(len(L)):
|
|
j = randint(i, len(L) - 1)
|
|
L[i], L[j] = L[j], L[i]
|
|
|
|
def choice(L):
|
|
return L[randint(0, len(L) - 1)] |