What is an efficient way to pad punctuation with whitespace?
input:
s = \'bla. bla? bla.bla! bla...\'
desired output:
If you use python3, use the maketrans() function.
import string text = text.translate(str.maketrans({key: " {0} ".format(key) for key in string.punctuation}))