1#import the regex library (pip install it with -> "pip install regex"
2import re
3
4test_phrase = 'This is a string! Bust it has punctuation. How can we remove it?'
5
6#We're going to replace the punctution with a whitespace
7clean = ' '.join(re.findall('[^!.?]+', test_phrase))
8# ^ Place the punctuation that you want
9# to remove in the square brackets.
10print(clean)
11> 'This is a string But it has punctuation How can we remove it'