It seems like there should be a simpler way than:
import string s = \"string. With. Punctuation?\" # Sample string out = s.translate(string.maketrans(\"\",\
A one-liner might be helpful in not very strict cases:
''.join([c for c in s if c.isalnum() or c.isspace()])