Computer Science, asked by creativegauri7220, 1 year ago

How to randomize the items of a list in Python?

Answers

Answered by Aagmansriva993
0

To use shuffle, import the Python random package by adding the line import random near the top of your program. Then, if you have a list called x, you can call random.shuffle(x) to have the random shuffle function reorder the list in a randomized way.

Similar questions