Eau de Web interview question

Some python code to clean and some function to implement