#with re import re s = "string. With. Punctuation?" s = re.sub(r'[^\w\s]','',s) #without re s = "string. With. Punctuation?" s.translate(str.maketrans('', '', string.punctuation))
s.translate(str.maketrans('', '', string.punctuation))