I'm kind've stuck on this problem! I have a massive text file (3 million lines or so) and I need to remove any lines that contain more then one tilde. Could someone be as kind to help me out! Please and thank you .
Here is what I have so far:
import re
f_in = 'C:\\Users\\John\\Documents\\Python\\Pagelinks\\pagelinkSample_10K_cleaned2.txt'
f_out = 'C:\\Users\\John\\Documents\\Python\\Pagelinks\\pagelinkSample_10K_cleaned3.txt'
with open(f_in, 'r') as fin:
with open(f_out, 'w') as fout:
for line in fin:
stuck here, i'm thinking if line count for tilde contains more then one delete line?
Thanks!