How do you randomize a list in Python?
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']
BY Best Interview Question ON 31 May 2020