Слово1
Слово2
Слово3
и т.д.
f_handlers = {}
with open('words_alpha.txt', 'r') as inp_file:
for line in inp_file:
w_len = len(line.strip())
if w_len == 0: # исключаем слова с нулевой длиной
continue
fn = f'words_{w_len}.txt'
f = f_handlers.setdefault(fn, open(fn, 'w+'))
f.write(line)
for handler in f_handlers.values():
handler.close()