+ 10
PY DOUBT
What is the function to randomize the items of a list in-place? kindly do elaborate it with an example which could be easier to understand the concept.
2 Respostas
+ 6
random.shuffle()
https://code.sololearn.com/cT69eC6uxWvl/?ref=app
0
from random import shuffle
i = [0,1,2,34,5,6,7,8,9]
shuffle(i)
print(i)