def word_list(sowpods=False, start="<STR_LIT>", end="<STR_LIT>"):
location = os.path.join(<EOL>os.path.dirname(os.path.realpath(__file__)),<EOL>"<STR_LIT>",<EOL>)<EOL>if sowpods:<EOL><INDENT>filename = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>filename = "<STR_LIT>"<EOL><DEDENT>filepath = os.path.join(location, filename)<EOL>with open(filepath) as wordfile:<EOL><INDENT>for word in wordfile.readlines():<EOL><INDENT>word = word.strip()<EOL>if start and end and word.startswith(start) and word.endswith(end):<EOL><INDENT>yield word<EOL><DEDENT>elif start and word.startswith(start) and not end:<EOL><INDENT>yield word<EOL><DEDENT>elif end and word.endswith(end) and not start:<EOL><INDENT>yield word<EOL><DEDENT>elif not start and not end:<EOL><INDENT>yield word<EOL><DEDENT><DEDENT><DEDENT>
Opens the word list file.

    Args:
        sowpods: a boolean to declare using the sowpods list or TWL (default)
        start: a string of starting characters to find anagrams based on
        end: a string of ending characters to find anagrams based on

    Yeilds:
        a word at a time out of 178691 words for TWL, 267751 for sowpods. Much
        less if either start or end are used (filtering is applied here)