diff --git a/4.py b/4.py index a1e750a..e389ca9 100644 --- a/4.py +++ b/4.py @@ -1,4 +1,4 @@ -# define punctuation +# define punctuation punctuations = '''!()-[]{};:'"\,<>./?@#$%^&*_~''' my_str = "Hello!!!, he said ---and went." @@ -6,7 +6,7 @@ # To take input from the user # my_str = input("Enter a string: ") -# remove punctuation from the string +# remove punctuation from the string and show no_punct = "" for char in my_str: if char not in punctuations: