# remove punctuation
import string
string.punctuation
#!"#$%&'()*+,-./:;<=>?@[]^_`{|}~
my_text = "The well-known story I told at the conferences [about hypocondria] in Boston, New York, Philadelphia,...and Richmond went as follows"
remove_punc=my_text.translate(str.maketrans('', '', string.punctuation))
print(remove_punc)
#The wellknown story I told at the conferences about hypocondria in Boston New York Philadelphiaand Richmond went as follows
# define punctuation
punctuations = '''!()-[]{};:'",<>./?@#$%^&*_~'''
my_str = "Hello!!!, he said ---and went."
# To take input from the user
# my_str = input("Enter a string: ")
# remove punctuation from the string
no_punct = ""
for char in my_str:
if char not in punctuations:
no_punct = no_punct + char
# display the unpunctuated string
print(no_punct)
import string
test_str = 'Gfg, is best: for ! Geeks ;'
test_str = test_str.translate
(str.maketrans('', '', string.punctuation))
print(test_str)