ok so, I want to have the bottom code to search that txt file find the line that contains the search criteria and then delete the line that contains the search criteria.
Ideas?
Ideas?
Code:
if action2=='2':
fob=open('/Users/NSutton/Simple Adress/bookdata.txt','r')
searchdelete=raw_input("Enter the name of the contact you'd like to delete: ")
for line in fob:
if searchdelete in line:
print line