From 0b050f8c4c0eac38f5e9bbd0fe3b921d2113a657 Mon Sep 17 00:00:00 2001 From: Ujjwaldhiman <44018161+Ujjwaldhiman@users.noreply.github.com> Date: Wed, 10 Oct 2018 13:06:48 +0530 Subject: [PATCH] Update 4.py --- 4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: