>>38618724import random
n = 10
twappis = ["p", "r"]
for i in range(n):
numLetters = random.randint(4, 6)
ltr = []
ltr.append("w")
if random.random() > 0.5:
ltr.append("o")
if random.random() > 0.5:
ltr.append("a")
for j in range(numLetters - len(ltr)):
noRepeat = random.choice([c for c in twappis if ltr.count(c) < 2])
ltr.append(noRepeat)
word = "T" + "".join(ltr)
print(word.capitalize())
I also made sure you couldnt repeat consonant (twappis) more than twice, so you can have "Tworpp" which is funny but not "Twpppp" which is also funny but less so.