Sep-21-2017, 06:06 PM
Quote:def generate_word(length = 5): return "".join(random.choice([VOWELS, CONSONANTS][_ % 2]) for _ in range(length))
Please, only use underscore for a variable name if you're not going to use that variable at all.
[_ % 2]
looks like some Perl nonsense, and shouldn't be anywhere in your code.