import re s = 'What? The Census Says It’s Counted 99.9 Percent of Households. Don’t Be Fooled.' print(re.sub(r'[^ 0-9a-zA-Z](?!(?<=\d\.)\d)', '', s)) print(re.sub(r'(?:_|[^\s\w])(?!(?<=\d\.)\d)', '', s))
Standard input is empty
What The Census Says Its Counted 99.9 Percent of Households Dont Be Fooled What The Census Says Its Counted 99.9 Percent of Households Dont Be Fooled