Write Python Program to Remove Punctuations From a String and print the cleaned string.


Topic: Write Python Program to Remove Punctuations From a String and print the cleaned string.

Solution

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)   
   
	



List all Python Programs