Question: Please use python method for coding. Please try coding without respective files. Function Name: spongebob Parameters: filename - a string containing the filename of the
Please use python method for coding. Please try coding without respective files. 
Function Name: spongebob Parameters: filename - a string containing the filename of the file we will filter Return Value: None Description: These text files have too much boring stuff, and too little SpongeBob. We're going to fix that. Make a function that takes in a file and writes the contents into another file, except only newlines and letters in "spongebob" are kept. The new file should be called the same name as the old file, except the new file has "new" in front. The comparison should work for both uppercase and lowercase letters, but the letters should be kept in their original case when being written to the new file. Note: Nothing is printed. The test cases show what certain files should contain after the function runs. Test Cases: >>> spongebob ("bucketList.txt") newbucketList.txt contains: sng pnng png ng ng sbng >>> spongebob ("groceries.txt") newgroceries.txt contains: Goees Nbebe Nbe Nbeeggs Nbeee
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
