Question: Python The function f(s,ch) gets a string s and a character ch. Then it returns a string that is similar to s but does NOT



Python The function f(s,ch) gets a string s and a character ch. Then it returns a string that is similar to s but does NOT have the character ch. If ch does not appear in s then the result string is equal to s. Example: fl'abacadaeafaga', 'a')=='bcdefg' f('abacadaeafaga','A')=='abacadaeafaga' Complete the following code for the function f: def f(s, ch): return Requirements: 1. You must NOT use any loop, nor comprehensions, nor recursion. 2. Remember that string in Python is immutable and can not be changed. 3. You must NOT define any function of your own. Hint : use operations that we have learned about strings
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
