Input: The quick brown fox jumps over the lazy dog Output: The string is a pangram Input: geeks for geeks Output: The string is not pangram
The usual way would be to use a frequency table and check if all elements were present or not. But by using import ascii_lowercase as asc_lower we import all the lower characters in the set and all the string characters in the other set. In the function, two sets of — one for all lowercase letters and one for letters in the line. The two sets are subtracted, and if it is an empty set, the string is a pangram.
Below is the Python implementation of the above approach:
The string is a pangram