Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Pangram by nikolaypasevich
from string import ascii_lowercase as asc_lower
def check_pangram(text: str) -> bool:
# your code here
return set(asc_lower)-set(text.lower())==set([])
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!")
Feb. 20, 2023
Comments: