Data Cleaning Basics; Code Matches, But Still Not Working

My code matches the answer code (except for the print I did to try to find what was going wrong).
Why is only stripping the open parenthesis character, but none of the other bad_chars?
I don’t understand.

Hi @colleenoleary77 and welcome to the community!

Almost, but not quite. There is a very important difference between your code and the answer; specifically, inside your function definition.

This is a VERY good question and if you keep following it, you will see why the code isn’t working the way you want it to. Try to find the part of your code that is responsible for cycling through the bad_chars to see if you can spot why it’s working for ( but none of the other characters.

HINT: you do not need to add/remove any code to fix this problem.

Let me know if this isn’t enough of a hint and we can try something else together.

Just as a friendly piece of advice, it’s always good to include a link to the lesson you’re posting about. You can check out this post for some great advise for posting technical questions in the community.