Skip to content

Commit 86c6698

Browse files
committed
udemy pangram string check
1 parent 4f7b9aa commit 86c6698

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ispangram.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import string
2+
3+
def ispangram(str1, alphabet=string.ascii_lowercase):
4+
st=str1.replace(' ','')
5+
cst=set(st)
6+
cst2=set(alphabet)
7+
diff= cst.difference(cst2)
8+
if diff is None:
9+
print('The string is pangram')
10+
11+
12+
13+
ispangram("The quick brown fox jumps over the lazy dog")

0 commit comments

Comments
 (0)