How to remove subset from a file efficiently?
iladijas at gmail.com
Thu Jan 12 20:54:02 CET 2006
The code it down to 5 lines!
barred = set(open('/home/sajid/python/wip/CBR0000319.dat'))
postpaid_file = open('/home/sajid/python/wip/PSP0000320.dat')
outfile = open('/home/sajid/python/wip/PSP-CBR.dat', 'w')
outfile.writelines(number for number in postpaid_file if number not
Awesome! (-: Thanks a ton Fredrik, Steve.
$ time ./cleanup.py
But there seem to be that discrepancy; will chk and update back here.
Thank you all once again.
More information about the Python-list