2020-01-24

Python - Remove text punctuation

import string

table = string.maketrans("","")
text = "this is. a list; with some's punctuation... yes!"
result = text.translate(table, string.punctuation)
print(result)

No comments:

Post a Comment