向日葵

xiangrikui
23 号测试 成员, 2018-11-20 11:55:02 加入
1.9k
个人主页浏览
  • Python13 期字符串大考核!!!

    2020-07-24 10:55

    a='sdSdsfdAdsdsdfsfdsdASDSDFDSFa'
    print(a.upper())
    print(a.lower())
    print(a.swapcase())
    b=a.swapcase()
    c=''
    for i in b:
    if i.isupper():
    i=chr(155-ord(i))
    c +=i
    elif i.islower():
    i=chr(219-ord(i))
    c +=i
    print(c)