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 thegiven "censored" substring in an original text string, ignoring case. For eachcensored substring found, replace every character with except for the first characterFor example: if Tish" is a censored substring, the original text 'Fish'becomes Write a function censor_substr that takes two input strings, 1st-the originaltext string to be searched on, .2nd- the censored substring, and returnsthe censored text string. You may assume there will not be complicationfrom unusual censored substrings like 'sss',or 'haha' vs. original text of 'ssssssss

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!