hello guys i tried to do that code but it's not work :(
F=open('C:\T\list.txt','r').readlines()
B=open('C:\T\list2.txt','w')
BB=open('C:\T\list2.txt','r').readlines()
while BB.readlines() == 'John smith':
B.writelines(F)
so how i can told my python : go to copy from file : List1.txt
to List2.txt
but if you found John smith
stop copying and close !
List1.txt:
Natly molar
Jone rock
marin seena
shan lra
John smith
Barry Bloe
Sara bloe`