-
Python13 期字符串大考核!!!
2020-07-24 10:55a = '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)