陀飞轮

eason
551 号测试 成员, 2018-12-02 12:58:31 加入
1.9k
个人主页浏览
  • Python13 期字符串大考核!!!

    2020-07-24 10:55

    a = 'sdSdsfdAdsdsdfsfdsdASDSDFDSFa'

    b=a.swapcase()

    print(a.swapcase())

    first=''
    for i in a:
    if i.islower():
    first = first + i.upper()
    else:
    first = first + i.lower()

    last=''
    for i in a:
    if i.islower():
    last=last+chr(219 - ord(i))
    else:
    last = last + chr(155 - ord(i))
    print (first)
    print(last)