DESCRIPTION:
A pangram is a sentence that contains every single letter of the alphabet at least once. For example, the sentence "The quick brown fox jumps over the lazy dog" is a pangram, because it uses the letters A-Z at least once (case is irrelevant).
Given a string, detect whether or not it is a pangram. Return True if it is, False if not. Ignore numbers and punctuation.
def is_pangram(s):
s=s.lower()
for i in range(26):
if chr(i+97) not in s:
return False
return True
'알고리즘 문제 > CodeWar' 카테고리의 다른 글
Count the smiley faces! (1) | 2022.09.26 |
---|---|
Take a Ten Minutes Walk (0) | 2022.09.26 |
Build a pile of Cubes (0) | 2022.09.26 |
Two Sum (0) | 2022.09.23 |
Odd or Even? (0) | 2022.09.23 |