You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/practice/pangram/.approaches/set-len/content.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,12 @@ def is_pangram(sentence):
8
8
- This approach first makes a [set][set] from the [`lower`][lower]cased characters of the `sentence`.
9
9
- The characters are filtered using a [set comprehension][set-comprehension] with an `if`[`isalpha()`][isalpha] statement, so that only alphabetic characters make it into the set.
10
10
- The function returns whether the [`len()`][len] of the [`set`][set] is `26`.
11
-
If the number of unique ASCIIletters in the `set` is equal to the `26` letters in the ASCII alphabet, then the function will return `True`.
11
+
If the number of unique [ASCII][ascii] (American Standard Code for Information Interchange) letters in the `set` is equal to the `26` letters in the [ASCII][ascii] alphabet, then the function will return `True`.
12
12
- This approach is efficient because it uses a set to eliminate duplicates and directly checks the length, which is a constant time operation.
0 commit comments