I have one file of 100GB having 1 to 1000000000000 separated by new line. In this some lines are missing like 5, 11, 19919 etc. My Ram size is 8GB.
How to find the missing elements.
My idea take another file for i in range(1,1000000000000)
read the lines one by one using the generator. can we use yield statement for this
Can help in writing the code
My Code, the below code taking as a list in does the below code can use it for production.?
def difference(a,b):with open(a,'r') as f:aunique=set(f.readlines())with open(b,'r') as f:bunique=set(f.readlines())with open('c','a+') as f:for line in list(bunique - aunique):f.write(line)