>>> is_pangram_faster("The quick brown fox jumps over the lazy dog") True >>> is_pangram_faster("Waltz, bad nymph, for quick jigs vex.") True >>> is_pangram_faster("Jived fox nymph grabs quick waltz.") True >>> is_pangram_faster("The quick brown fox jumps over the la_y d
(
input_str: str = "The quick brown fox jumps over the lazy dog",
)
| 33 | |
| 34 | |
| 35 | def is_pangram_faster( |
| 36 | input_str: str = "The quick brown fox jumps over the lazy dog", |
| 37 | ) -> bool: |
| 38 | """ |
| 39 | >>> is_pangram_faster("The quick brown fox jumps over the lazy dog") |
| 40 | True |
| 41 | >>> is_pangram_faster("Waltz, bad nymph, for quick jigs vex.") |
| 42 | True |
| 43 | >>> is_pangram_faster("Jived fox nymph grabs quick waltz.") |
| 44 | True |
| 45 | >>> is_pangram_faster("The quick brown fox jumps over the la_y dog") |
| 46 | False |
| 47 | >>> is_pangram_faster() |
| 48 | True |
| 49 | """ |
| 50 | flag = [False] * 26 |
| 51 | for char in input_str: |
| 52 | if char.islower(): |
| 53 | flag[ord(char) - 97] = True |
| 54 | elif char.isupper(): |
| 55 | flag[ord(char) - 65] = True |
| 56 | return all(flag) |
| 57 | |
| 58 | |
| 59 | def is_pangram_fastest( |
nothing calls this directly
no outgoing calls
no test coverage detected