| 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 | |