import random from words import words import string
def get_valid_word(words): word = random.choice(words) #randomly chooses something from that list while \'-\' in w