from concurrent.futures import ProcessPoolExecutor as Executor
with Executor(max_workers=5) as ex:
    with open('poeem_5.txt') as fl:
        results = list(ex.map(len, fl))
Efficient way to read data in python