Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Pangram by sesenion
def check_pangram(text: str) -> bool:
alphabet = set("abcdefghijklmnopqrstuvwxyz")
chars_in_text = set(text.lower())
return len(alphabet - chars_in_text) == 0
print("Example:")
print(check_pangram("The quick brown fox jumps over the lazy dog."))
# These "asserts" are used for self-checking
assert check_pangram("The quick brown fox jumps over the lazy dog.") == True
assert check_pangram("ABCDEF") == False
assert check_pangram("abcdefghijklmnopqrstuvwxyz") == True
assert check_pangram("ABCDEFGHIJKLMNOPQRSTUVWXYZ") == True
assert check_pangram("abcdefghijklmnopqrstuvwxy") == False
assert (
check_pangram("Bored? Craving a pub quiz fix? Why, just come to the Royal Oak!")
== True
)
assert check_pangram("As quirky joke, chefs won't pay devil magic zebra tax.") == True
assert check_pangram("Six big devils from Japan quickly forgot how to walt.") == False
print("The mission is done! Click 'Check Solution' to earn rewards!")
Nov. 19, 2022
Comments: