I am working on a project where I want a program that makes a string containing 5 random words from a list. The list contains 5 words and I want all possible combinations where only one word from the list can be used once per string.
import time
import random
lista = ["w1", "w2", "w3", "Vickpix", "siplse"]
database = []
count = 0
while True:
nu = random.choice(lista) + random.choice(lista) + random.choice(lista) + random.choice(lista) + random.choice(lista)
if nu in database:
pass
else:
count += 1
print(count)
database.insert(1, nu)