File size: 400 Bytes
7992c94 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import random
with open("nouns.txt", "r") as infile:
nouns = infile.read().strip(" \n").split("\n")
with open("adjectives.txt", "r") as infile:
adjectives = infile.read().strip(" \n").split("\n")
def get_random_name() -> str:
word1 = random.choice(adjectives).title()
word2 = random.choice(nouns).title()
username = f"{word1}{word2}{random.randint(1, 99)}"
return username
|