suryansh-code / hangman

Re-defined variable from outer scope PYL-W0621
Anti-pattern
Major
6 months ago6 months old
Redefining name 'wordlist' from outer scope (line 79)
 61    return wordlist
 62
 63
 64def choose_word(wordlist): 65    """
 66    wordlist (list): list of words (strings)
 67
Redefining name 'wordlist' from outer scope (line 79)
 56    # line: string
 57    line = inFile.readline()
 58    # wordlist: list of strings
 59    wordlist = line.split() 60    print("  ", len(wordlist), "words loaded.")
 61    return wordlist
 62