Can anyone tell me if there is any function for replacing multiples substrings within a string.
For instance we have this function call to replace multiple appearances of the same substring:
newLine = line.replace(';', '_')
Here I replace all appearances of ';' with '_'
But what I need is a function that receives a list of substrings to replace withing a string.
newLine = line.replace([';', ',', '.'], '_')
Here I replace all appearances of ';', ',' and '.' with '_'