For this part in the assignment, you need to write a program in python that removes all instances of a target element in a file named inputFile.txt. The user must enter the instance that you need to remove from that file. Once you received that instance, you need to check all the content in the inputFile.txt and remove that word. The result will be saved in another file called outputFile.txt. For example, if you received that the user wants to remove the word “and”, you need to identify all the matches and remove them in the outputFile.txt document.
For this part in the assignment, you need to write a program in python that removes all
instances of a target element in a file named inputFile.txt. The user must enter the instance that
you need to remove from that file. Once you received that instance, you need to check all the
content in the inputFile.txt and remove that word. The result will be saved in another file called
outputFile.txt. For example, if you received that the user wants to remove the word “and”, you
need to identify all the matches and remove them in the outputFile.txt document.
Requirements: You should create the content in the inputFile.txt, please make them at least
with ten lines or more. You could include poems, lyrics, news, etc. It is up to you. Also, you
must use functions to solve this part in the assignment
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images