第三章 7-13 字符串字母大小写转换

s= input()
new=[]
for i in s:
    if i.islower():
        i=i.upper()
    elif i.isupper():
        i=i.lower()
    else:
        i=i
    new.append(i)
print(''.join(new[:-1]))
发布了80 篇原创文章 · 获赞 6 · 访问量 7628

猜你喜欢

转载自blog.csdn.net/qq_33749437/article/details/104887784