I have a string:
res = 'qwer!@ 234234 4234gdf36/\////// // \ \\\$%^$% dsfg'
and I want to remove ALL slashes and backslashes. I tried this:
import string
import re
symbolsToRemove = string.punctuation
res = 'qwer!@ 234234 4234gdf36/\////// // \ \\\$%^$% dsfg'
res = re.sub(r'['+symbolsToRemove+']', ' ', res)
print(res)
But get the next result:
qwer 234234 4234gdf36 \ \ \ dsfg
What am I doing wrong?