vendredi 6 novembre 2015

how do i get python to randomly return 4 letters from a list

I have a list

mycolours = [R, G, B, Y, P, O],

I was going to use a for loop with random.shuffle(mycolours), but I only want python to return four of the strings




Aucun commentaire:

Enregistrer un commentaire