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 5767f7e

Browse files
Add files via upload
1 parent ccf6418 commit 5767f7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎Assignment-11.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
"duplicates = []\n",
170170
"for char in string:\n",
171171
" ## checking whether the character have a duplicate or not\n",
172-
" ## str.count(char) returns the frequency of a char in the str\n",
172+
" ## string.count(char) returns the frequency of a char in the string\n",
173173
" if string.count(char) > 1:\n",
174174
" if char not in duplicates:\n",
175175
" duplicates.append(char)\n",
@@ -193,15 +193,15 @@
193193
],
194194
"source": [
195195
"import string\n",
196-
"# special characters\n",
196+
"# special characters which contains all punctionmarks in it\n",
197197
"special_chars = string.punctuation\n",
198198
"# initializing a string\n",
199199
"str1 = \"@k@$#Borg@lli!\"\n",
200200
"str2 = \"AkashBorgalli\"\n",
201-
"# checking the special chars in the string_1\n",
201+
"# checking the special chars in the str1\n",
202202
"boolvalue = list(map(lambda char: char in special_chars, str1))\n",
203203
"print(\"It contains special characters\") if any(boolvalue) else print(\"Doesnot contains any special characters\")\n",
204-
"# checking the special chars in the string_2\n",
204+
"# checking the special chars in the str2\n",
205205
"boolvalue = list(map(lambda char: char in special_chars, str2))\n",
206206
"print(\"It contains special characters\") if any(boolvalue) else print(\"Doesnot contains any special characters\")"
207207
]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /