[Tutor] Find (list) strings in large textfile

2017-02-09 Thread Sylwester Graczyk
Hi all, I'm try to write a code to search strings (from one textfile with lists of strings) in second large text file. but script doesn't search my lists in entire file (not complete output file) *[list_life.txt]* 1654 964563 41164 6165456 85248 999745 35496486 ... +2000 row's *[large_file.txt

Re: [Tutor] Find (list) strings in large textfile

2017-02-11 Thread Sylwester Graczyk
It is probably better to store your key file in memory then loop over the large data file and check the line against each key. Better to check 2000 data keys in memory for one loop of the data file. That way you only read the key file and data file once each - 502,000 reads instead of a billion.