I am new to python and using python 2.7. I am writing a program to parse raw re files . I have written a function which calls a file and puts every 4 line in a list . My file is big say 4 GB of raw dna data.
def filerd(f):
identifier = []
with open(f,'r') as inputfile:
count = 1
for line in inputfile:
if count%4 == 1:
identifier.append(line)
count = count + 1
else:
count = count + 1
return identifier
Now how can i parallelize this function so that i can get speedup. Is there any way when i can run this function on 5 cores of my server?