Pangram checker
Write a function or method to check a sentence to see if it is a pangram or not and show its use.
Pangram checker
You are encouraged to solve this task according to the task description, using any language you may know.
You are encouraged to solve this task according to the task description, using any language you may know.
A pangram is a sentence that contains all the letters of the alphabet at least once, for example: The quick brown fox jumps over the lazy dog.
Python
Using set arithmetic: <lang python>import string
def ispangram(sentence, alphabet=string.ascii_lowercase):
alphaset = set(alphabet) return (set(sentence.lower()) & alphaset) == alphaset
print ( ispangram(input('Sentence: ')) )</lang>
Sample output:
Sentence: The quick brown fox jumps over the lazy dog True