A simple Python program that allows users to search through text files for specific words or lines. The tool provides two main functionalities: searching for complete lines containing a word and searching for exact word matches and the amount found.
⚠️⚠️⚠️txt file must be in the same file directory as the python script⚠️⚠️⚠️
Run the script using Python:
python main.py
# Example for line search
What file do you want to search in? (must be txt) test
Enter a word to search for: pepe
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
The word was found in 2 lines
Line: pepe was a war hero (Line 4)
Line: pepe popo kokoko doko was coco (Line 8)
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
# Example for word search
What file do you want to search in? (must be txt): test
Enter a word to search for: pepe
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
The word was found 2 times
Word: pepe (Line 4)
Word: pepe (Line 8)
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
The tool includes basic error handling for:
ByteOfWaffle (Jeremy)