Question: Also, the code below is the triangle.error.py file that given along. use this code for question 2. Write a program that replaces all the occurrences
Also, the code below is the triangle.error.py file that given along. use this code for question 2.
Write a program that replaces all the occurrences of an existing specified string from a text file with a new specified string. Your program should prompt the user to enter a filename, an existing string, and a new string. (For simplicity, convert all letters to lowercase.) Here is a sample run: Enter a filename: test.txt Enter the existing string to be replaced: morning Enter the new string to replace the existing string: evening Done
Step by Step Solution
3.58 Rating (155 Votes )
There are 3 Steps involved in it
Task 1 Replacing Occurrences in a Text File Prompt the user for input filename inputEnter a filename ... View full answer
Get step-by-step solutions from verified subject matter experts
