lines = open('input.txt').readlines()
pool = multiprocessing.Pool(processes=numthreads)
result_list = pool.map(worker, (lines[line:line + numlines] for line in
    range(0, len(lines), numlines)))
result = {}
map(result.update, result_list)
parallel file parsing, multiple CPU cores