Intermediate · Sets · 144 of 264
Pangram
A pangram uses every letter of the English alphabet at least once. Ignore capitals.
Input: one line. Output: yes or no
Examples
Input
The quick brown fox jumps over the lazy dog
Output
yes
Input
Hello world
Output
no
Input
Pack my box with five dozen liquor jugs
Output
yes
One more test checks other inputs when you press Check.
Stuck? The idea behind sets
A set holds each value once, in no particular order: set(list) drops repeats at once.
Checking whether a value is in a set is fast. & keeps what two sets share, | joins them, - keeps what is only in the first.
a = set(input().split()) b = set(input().split()) print(sorted(a & b))
Watch for: A set has no order: sort it (sorted()) before printing, or the order may change.