I would like to copy certain lines of text from one text file to another. In my current script when I search for a string it copies everything afterwards, how can I copy jus
f=open('list1.txt') f1=open('output.txt','a') for x in f.readlines(): f1.write(x) f.close() f1.close()
this will work 100% try this once