I’m trying to optimize my code. I have a list of strings that have quite a few characters I don’t want. Rather than just call
My_string.replace(‘!’, ‘’).replace(‘$’, ‘’)…
I was hoping for a more elegant solution. I have probably 50-60 characters that need to be removed. I do need to use pairs somehow because not every character is being replaced with nothing.