Check if a string is Pangrammatic Lipogram | collection of letters ; function to check for a Pangrammatic Lipogram ;  ; variable to keep count of all the letters not found in the string ; traverses the string for every letter of the alphabet ; character not found in string then increment count ; Driver program to test above function
alphabets = ' abcdefghijklmnopqrstuvwxyz ' NEW_LINE def panLipogramChecker ( s ) : NEW_LINE / * convert string to lower case * / NEW_LINE INDENT s . lower ( ) NEW_LINE counter = 0 NEW_LINE for ch in alphabets : NEW_LINE INDENT if ( s . find ( ch ) < 0 ) : NEW_LINE INDENT counter += 1 NEW_LINE DEDENT DEDENT if ( counter == 0 ) : NEW_LINE INDENT result = " Pangram " NEW_LINE DEDENT elif ( counter == 1 ) : NEW_LINE INDENT result = " Pangrammatic ▁ Lipogram " NEW_LINE DEDENT else : NEW_LINE INDENT result = " Not ▁ a ▁ pangram ▁ but ▁ might ▁ a ▁ lipogram " NEW_LINE DEDENT return result NEW_LINE DEDENT def main ( ) : NEW_LINE INDENT print ( panLipogramChecker ( " The ▁ quick ▁ brown ▁ fox ▁ \ ▁ jumped ▁ over ▁ the ▁ lazy ▁ dog " ) ) NEW_LINE print ( panLipogramChecker ( " The ▁ quick ▁ brown ▁ fox ▁ \ ▁ jumps ▁ over ▁ the ▁ lazy ▁ dog " ) ) NEW_LINE print ( panLipogramChecker ( " The ▁ quick ▁ brown ▁ fox ▁ jum\ ▁ over ▁ the ▁ lazy ▁ dog " ) ) NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT main ( ) NEW_LINE DEDENT