I am not too sure why this returns None, it worked perfectly before I tried putting it into a function. It is supposed to return a list of words that are between 6 and 9 characters long.
def level_list(minn, maxx):
for words in word_list:
if len(words) >= minn and len(words) <= maxx:
return level_words.append(words)
print(level_list(6, 9))