12347 10000 secretary James Harrison
12348 20000 secretary Jade Powell
12341 40000 consultant Adam Johnson
Hi, lets just say that the text above is a text file. How would I go about searching and printing the rows with 'secretary' only? Or any other value? When the user is asked to input a word to search
The code below prints out everything in a file:
f = open("a text file", "r");
print(f.read())
print(f.readline())
myLines = f.readlines()
for line in myLines:
print(line)