Can do it like this.
>>> from string import punctuation >>> >>> s = "All.Good,Dogs.. Eat.! Shoes?" >>> ''.join(c for c in s if c not in punctuation) 'AllGoodDogs Eat Shoes'Or specify yourself what to remove.
>>> s = "All.Good,Dogs.. Eat.! Shoes?" >>> "".join(c for c in s if c not in list(',.!')) 'AllGoodDogs Eat Shoes?'