Hackbright Code Challenges

Pangram

Pangram

Whiteboard

Easier

Challenge

Easier

Concepts

Sets, Strings

Download

pangram.zip

Solution

Pangram: Solution


A pangram is a sentence that contains all the letters of the English alphabet at least once, like “The quick brown fox jumps over the lazy dog.”

Write a function to check a sentence to see if it is a pangram or not.

For example:

>>> is_pangram("The quick brown fox jumps over the lazy dog!")
True

>>> is_pangram("I like cats, but not mice")
False
pangram.py
def is_pangram(sentence):
    """Given a string, return True if it is a pangram, False otherwise."""