vnea

vnea
571 号测试 成员, 2018-12-03 12:29:03 加入
2.0k
个人主页浏览
  • Python13 期字符串大考核!!!

    2020-07-24 10:55

    s="sdSdsfdAdsdsdfsfdsdASDSDFDSFa"
    s1=s.swapcase()
    print("调整之后的字符串为",s1)
    new_s=''
    for i in s1:
    if i.islower():
    i = chr(219-ord(i))
    new_s +=i
    elif i.isupper():
    i=chr(155-ord(i))
    new_s += i
    print("镜像之后的值:", new_s)