Answers for "how does random.shuffle work in python"

3

random.shuffle

import random

list = [20, 16, 10, 5]
random.shuffle(list)
print("Reshuffled list : ",list)

OUTPUT:
Reshuffled list :  [16, 5, 10, 20]
Posted by: Guest on July-31-2020

Code answers related to "how does random.shuffle work in python"

Python Answers by Framework

Browse Popular Code Answers by Language