+ 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.

8th Oct 2020, 3:58 PM
Hardik
Hardik - avatar
2 Respostas
8th Oct 2020, 4:15 PM
Slick
Slick - avatar
0
from random import shuffle i = [0,1,2,34,5,6,7,8,9] shuffle(i) print(i)
5th Apr 2021, 1:45 PM
Soulaimane Sarouri
Soulaimane Sarouri - avatar