This question has already been answered:

There is a prepared list of words, it is necessary that a word be randomly chosen, sent and no longer used until all the words have run out.

Reported as a duplicate by Twiss , Fat-Zer , Vadizar , jfs python Apr 13 '18 at 2:22 pm

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

    1 answer 1

    import random l = list(range(10)) while l: print(l.pop(random.randrange(len(l)))) 

    Conclusion:

     6 8 4 9 5 0 7 2 3 1 
    • prntscr.com/j4i0o3 Words repeated (word option - 3, attempts 5) - Haspid
    • Well, delete the repetitions: l = list(set(l)) - Scarabyte
    • prntscr.com/j4ibio 6 tries, 3 words. Did as you said and nothing has changed - Haspid