I have a huge corpus of text (line by line) and I want to remove special characters but sustain the space and structure of the string.
hello? there A-Z-R_T(,**)
Create a dictionary mapping special characters to None
d = {c:None for c in special_characters}
Make a translation table using the dictionary. Read the entire text into a variable and use str.translate on the entire text.