Update:
Installing 64-bit Python solves the problem.
The OP used 32-bit Python, therefore, to limit the amount of memory.
Reading the whole comment I think this may help you.
. N , .
:
from itertools import islice
def get_lines(file_handle,num_of_lines = 10):
while True:
next_n_lines = list(islice(file_handle, num_of_lines))
if not next_n_lines:
break
yield next_n_lines
o = open('mproducts.txt','w')
with open('reviewsNew.txt','r') as f1:
for data_lines in get_lines(f1):
for line in data_lines:
line = line.strip()
line2 = line.split('\t')
o.write(str(line))
o.write("\n")
o.close()