Post
Python
How to remove punctuation marks from a string in Python 3.x?
Posted on 29th March 2024
You can simply remove all the punctuation by using this
import re, string
eclean_string = re.sub(rf"[{string.punctuation}]", "", dirty_string)
STILL GOT QUERIES?