多组输入,每一行输入大写字母。
针对每组输入输出对应的小写字母。
A B
a b
多组输入过程中要注意“回车”也是字母,所以要“吸收”(getchar())掉该字母。
while True: try: alpha = input() print(alpha.lower()) except Exception as e: break
while 1 : try: c = input() except: break else: print(c.lower())
list=[] while True: try: s = input() list.append(s) except: break for i in list: print(i.lower())
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题