多组输入,每一行输入大写字母。
针对每组输入输出对应的小写字母。
A B
a b
多组输入过程中要注意“回车”也是字母,所以要“吸收”(getchar())掉该字母。
import sys for line in sys.stdin: lst = line.split('\n') for ch in lst: if ch != '': print(ch.lower())
while True: try: mes = input() print(mes.lower()) except EOFError: break
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题