Pangrams

  • + 0 comments

    def pangrams(s):

     # The English alphabet
    alpha = "abcdefghijklmnopqrstvwxyz"
    
    # Convert the input string to lowercase and to a set to remove duplicates
    s = set(s.lower())
    
    # Returns 'True' only incase ALL English alphabetical letters included in the string.
    if all(char in s for char in alpha):
        return 'pangram'
    else:
        return 'not pangram'