Hi there Im looking to shuffle an array of 15 integers. I can do this in a long winded manner i'm sure however I was wondering if there is a simple function to do this? i have tried importing random and using random.shuffle however it tells me it can only take a maximum of 3 positional arguments. Is there a function that can do this for a long array? Im struggling to find a way so far
import random
a = random.shuffle(9,
6,
7,
5,
6,
8,
8,
9,
8,
6,
6,
7,
7,
7)
print(a)
Aucun commentaire:
Enregistrer un commentaire