# cut top 10 list in files
# load entire file in memory
text = open(targetfilename).readlines()
count = 0
while count < 10 :
del text[0]
count = count + 1
# store 10 lines back new file
fout = open(outputfilename,'w')
fout1.writeines(text)
fout1.close()
0 comments:
Post a Comment