Let's say you run a big website for kids and you want to prevent your young users from reading certain naughty words. (Note: it's just a silly example, please don't email me about kids, language, and censorship.) Write a function that takes uncleaned text and a list of naughty words, replaces naughty words found in the text with an equivalent number of asterisks.
Here's an example:
(clean "You are a farty pants." ["fart" "poop"]) ;=> "You are a ****y pants." (clean "Curse this site!" ["jinx" "curse"]) ;=> "**** this site!"
Bonus: write the reverse function. It takes text and replaces *'s with naughty words of the same length.
Thanks to this site for the challenge idea where it is considered Hard level in Python.
Email submissions to firstname.lastname@example.org before July 26, 2020. You can discuss the submissions in the comments below.