# 分析:输入一个字符,所有不用循环 # 思路,使用ascall码进行范围判定(范围A-Z或者a-z之间)注意Z-a之间并非直接连起来的,之前有着其他的字符 # str1 = input() # if (ord(str1) in range(ord("A"), ord("Z") + 1))&nbs***bsp;( # ord(str1) in range(ord("a"), ord("z") + 1) # ): # print("YES") # else: # print("NO") # 方法2:使用内置函数(借鉴评论区)-使用躺平式子十分简洁 print("YES" if input().isalpha() else "NO")