大小写转换

import string
str1 = input()
for i in str1:
    if i in string.ascii_lowercase:
        print(i.upper(),end="")
    elif i in string.ascii_uppercase:
        print(i.lower(),end="")
    else:
        print(i,end="")

 

posted @ 2020-04-14 22:30  林晓婷  阅读(186)  评论(0)    收藏  举报