import string def remove_punctuations(text): for punctuation in string.punctuation: text = text.replace(punctuation, '') return text