-
20181210Python 自动化笔试题,挑战你的知识库
2020-07-24 10:55s = ''
for i in range(1, 5,2):
print((si).center(5))
for i in reversed(range(1, 6, 2)):
print((s*i).center(6)) -
Python13 期字符串大考核!!!
2020-07-24 10:55a='sdSdsfdAdsdsdfsfdsdASDSDFDSFa'
print (a.swapcase())
#字符串大小写转换
a='sdSdsfdAdsdsdfsfdsdASDSDFDSFa'
s = ''
for i in a:
if i.islower():
i = chr(219 - ord(i))
s += i
elif i.isupper():
i = chr(155 - ord(i))
s += i
print(s)
#镜像字符串