jeudi 7 octobre 2021

Choosing random list

I would like to randomly choose list as whole for example, I have lists with colors

list1 = ['blue','green']
list2 = ['red','yellow']

I have tried

random.choice(list1 or list2)

But it gives me random elemnt from them not the whole thing




Aucun commentaire:

Enregistrer un commentaire