Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2daba64

Browse files
added punctuation remove program πŸ‘©β€πŸ’»
1 parent 015f060 commit 2daba64

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# define punctuation
2+
punctuations = '''!()-[]{};:'",円<>./?@#$%^&*_~'''
3+
4+
my_str = "Hello!!!, he said ---and went."
5+
6+
# To take input from the user
7+
# my_str = input("Enter a string: ")
8+
9+
# remove punctuation from the string
10+
no_punct = ""
11+
for char in my_str:
12+
if char not in punctuations:
13+
no_punct = no_punct + char
14+
15+
# display the unpunctuated string
16+
print(no_punct)

0 commit comments

Comments
(0)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /