Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def checkPangram(s):
- bucket = []
- # create list of 26 charecters and set false each entry
- for i in range(26):
- bucket.append(False)
- # converting the sentence to lowercase and iterating over the sentence
- for c in s.lower():
- if not c == " ":
- bucket[ord(c) -ord('a')]= True
- return True if all(bucket) else False
- sentence = "The quick brown fox jumps over the little lazy dog"
- print(checkPangram(sentence))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement