Loading, please wait...

Remove Punctuations

To remove all the punctuations from a given sentence by user.

 

Code:

punctuations = '''!()-[]{};:'"\,<>./?@#$%^&*_~'''
my_str = "Hello!!!, he said ---and went."
no_punct = ""
for char in my_str:
if char not in punctuations:
no_punct = no_punct + char
print(no_punct)

 

Then, Click on the run button to execute.