Question: strfind and strrep (or strfind and loop), lower/upper Bleep out the given censored substring in an original text string, ignoring case. For each censored substring








strfind and strrep (or strfind and loop), lower/upper Bleep out the given "censored" substring in an original text string, ignoring case. For each censored substring found, replace every character with except for the first character For example: if Tish" is a censored substring, the original text 'Fish' becomes Write a function censor_substr that takes two input strings, 1st-the original text string to be searched on, .2nd- the censored substring, and returns the censored text string. You may assume there will not be complication from unusual censored substrings like 'sss',or 'haha' vs. original text of 'ssssssss hahahahaha" To keep the problem simple, the result will be compared, ignoring case. For example suppose ' F ' ' is expected. The string ' f* * * ' ' will also be considered correct. C) If you want to challenge yourself, try to preserve uppercase/lowercase of the first characters of the censored substrings. o intil finich al
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
