Censure palavras de uma lista

Published by _3G_ in

Crie uma função que receba uma string txt e censure qualquer palavra de uma lista fornecida lst. O texto removido deve ser substituído pelo caractere informado char.

Exemplos

censor_string("Today is a Wednesday!", ["Today", "a"], "-") ➞ "----- is - Wednesday!"

censor_string("The cow jumped over the moon.", ["cow", "over"], "*") ➞ "The *** jumped **** the moon."

censor_string("Why did the chicken cross the road?", ["did", "chicken", "road"], "*") ➞ "Why *** the ******* cross the ****?"

Observações

N/A