0 votes
in Python by
Write code to show randomizing the items of a list in place in Python along with the output.

1 Answer

0 votes
by

from random import shuffle

x = ['hackr.io', 'Is', 'The', 'Best', 'For', 'Learning', 'Python']

shuffle(x) 

print(x)

Output:

['For', 'Python', 'Learning', 'Is', 'Best', 'The', 'hackr.io']

Related questions

0 votes
asked Jun 24, 2020 in Python by Robindeniel
+1 vote
asked Feb 15, 2021 in Python by SakshiSharma
...