Source Code:
(back to article)
import random my_list = [1, 2, 3, 4, 5] shuffled_list = random.sample(my_list, k=len(my_list)) print(shuffled_list)
Result:
Report an issue