Relative Content

Tag Archive for pythonfile-io

find the line in which a given word occurs in a .txt file

The goal is to find the line in which a word occurs in a given .txt file.
In my code I’ve defined a function and have used with open syntax. When I execute it, all I get is “enter the word you want to find” and when I enter the word, the execution automatically ends