全字母句(Python)

全字母句(Python)
Problem Description
全字母句 (pangram) 指包含字母表中全部 26 种英文字母(不区分大小写)的句子,其常被用于展示英文字体的显示效果。
现在,bLue 得到了很多句子,他想知道哪些句子是全字母句。
Input
输入数据有多组(数据组数不超过 100),到 EOF 结束。
每组数据包含一行长度不超过 100 的字符串。
Output
对于每组数据,输出一行。
如果是全字母句则输出 “Yes”,否则输出 “No”(不包括引号)。
Sample Input
The quick brown fox jumps over the lazy dog.
The 6th ACM Funny Programming For/While Contest
Sample Output
Yes
No
Hint

Source
【第六届ACM趣味编程循环赛 Round #3】bLue

while True:
    str = input()
    str = str.lower()
    r = {}
    for i in str:
        if(ord(i)>=ord('a') and ord(i)<=ord('z')):
            r[i] = str.count(i)
    if(len(r)==26):
        print("Yes")
    else:
        print("No")

你可能感兴趣的:(自学python)