I\'m trying to remove the punctuation from a unicode string, which may contain non-ascii letters. I tried using the regex module:
regex
import regex text
Try string module
string
import string,re text = u"<Üäik>" out = re.sub('[%s]' % re.escape(string.punctuation), '', text) print out print type(out)
Prints-
Üäik