0

I made a function, but when I run it, it's stuck in the loop:

def valid_word(words):
    word= random.choice(words)
    while "-" or " " in word:
        word= random.choice(words)
        print("Inside loop")
    return word.upper()
khelwood
  • 55,782
  • 14
  • 81
  • 108
Aditya-47
  • 11
  • 2

0 Answers0