Question: 2. Using a for loop, implement the function censor0 that takes the name of a file as input. The function should open the file, read

2. Using a for loop, implement the function censor0 that takes the name of a file as input. The function should open the file, read it, and then write it into a file called censor.txt with this modification: Every occurrence of a four-letter word should be replaced with string xxxx. >>> censor('example.txt')- Note that this function does not produce output, but it does create the file censored.txt in the current folder.v
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
