Sorry if this has been asked before, but i didn't seem to find a solution to my problem.
I have around 500 text files, each around 5-6 kB in size. I need to search every file and check if a particular keyword is present in it, and print the details of every file in which the keyword is present.
I can do this using
for files in glob.glob("*"):
and then search for the keyword inside the file
I'm sure this isn't the most efficient way to do this. What better way is there?