-
Python13 期字符串大考核!!!
2020-07-24 10:55w='sdSdsfdAdsdsdfsfdsdASDSDFDSFa'
w1=w.swapcase()
print('大小写转换后的字符串:',w1)
new_w=''
for i in w:
if i.islower():
i = chr(219-ord(i))
new_w +=i
elif i.isupper():
i = chr(155 - ord(i))
new_w +=i
print('镜像字符串是:',new_w) -
Python13 期字符串大考核!!!
2020-07-24 10:55w='sdSdsfdAdsdsdfsfdsdASDSDFDSFa'
print(w.swapcase())
print(w.replace('A','Z',2))