jeudi 4 juin 2020

how do i print an random item from a list reapetedly without it repeating itself? [duplicate]

I am in the early stages of my learning at the moment and i am attempting to make a simple little memory game.

The problem i am having is printing a different random item constantly until the list has been exhausted, whilst giving the user a little time between each output to remeber it.

import random

List1 = ['item' , 'item' , 'ect']

Print(random.choice(List1))

input('press enter for next item')



Aucun commentaire:

Enregistrer un commentaire