Answer:
One can use replace() inside a loop to check for a bad_char and then replace it with the empty string hence removing it. This is the most basic approach and inefficient on performance point of view.
Step-by-step explanation:
Call str. replace(old, new) with the character to remove as old and the empty string "" as new . Assign the resultant string to the original string's variable. Use a loop to iterate through a string of multiple specific characters and remove them