Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

list python shuffling

import random

l = list(range(5))
print(l)
# [0, 1, 2, 3, 4]

random.shuffle(l)
print(l)
# [1, 0, 4, 3, 2]
Source by note.nkmk.me #
 
PREVIOUS NEXT
Tagged: #list #python #shuffling
ADD COMMENT
Topic
Name
3+4 =