First, I got a file with every word from GitHub link: https://github.com/dwyl/english-words/blob/master/words_alpha.txt, then I wrote this code:
with open("words_alpha.txt", 'r') as file:
words = file.readlines()
words_filtered = [word.replace('\n', '') for word in words if len(word) < 7 and len(word) > 2]