1.

How do you randomize a list in Python?

Answer»

from random import SHUFFLE

X = ['My', 'Singh', 'Hello', 'India']

shuffle(x)

PRINT(x)

The OUTPUT of the following code is as below.

['Singh', 'India', 'Hello', 'My']



Discussion

No Comment Found