OscarCunningham
searching PlanetScale…
- 1.▲
- 2.▲
- 3.▲
- 4.▲
- 5.▲
- 6.▲
73 ms·
- 871.▲
- 872.▲
- 873.▲
- 874.▲
- 875.▲
- 876.▲
- 877.▲
- 878.▲
An easy way to randomise a list is the following: import random
list = [0,1,2,3,4,5,6,7,8,9]
length = len(list)
for i in range(1,length):
j = length - i
k = random.randrange(j+1)
list[j], - 879.▲
- 880.▲
- 881.▲
- 882.▲
- 883.▲
- 884.▲
- 885.▲
- 886.▲
- 887.▲
- 888.▲
- 889.▲
- 890.▲
- 891.▲
- 892.▲
- 893.▲
- 894.▲
- 895.▲
- 896.▲
- 897.▲
- 898.▲
- 899.▲
- 900.▲
More ›