We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c15b8c commit d283965Copy full SHA for d283965
strings/check_pangram.py
@@ -0,0 +1,16 @@
1
+def check_pangram(input_str: str) -> bool:
2
+ """
3
+ Check if a string is a pangram (contains every letter of the alphabet).
4
+ >>> check_pangram("The quick brown fox jumps over the lazy dog")
5
+ True
6
+ >>> check_pangram("Hello World")
7
+ False
8
+ >>> check_pangram("")
9
10
11
+ return len(set(c for c in input_str.lower() if c.isalpha())) == 26
12
+
13
14
+if __name__ == "__main__":
15
+ import doctest
16
+ doctest.testmod()
0 commit comments