最后一个字母错了QAQ
# 输出Hello,World!
def codeShowStr(codes):
for c in codes[:-1]:
print(chr(c),end='')
print(chr(c))
return
def charIsNum(char):
_1_ = ord('0')
_2_ = ord('9')
charCode = ord(char)
if _1_ <= charCode <= _2_:
return True
else:
return False
def strShowString(str):
if str == '':
print()
cutLeft = 0
cutRight = cutLeft + 1
result = []
while True:
while cutRight < len(str) and charIsNum(str[cutRight]):
cutRight += 1
result.append(int(str[cutLeft:cutRight]))
if not cutRight < len(str):
break
cutLeft = cutRight + 1
while cutLeft < len(str) and not charIsNum(str[cutLeft]):
cutLeft += 1
if not cutLeft < len(str):
break
cutRight = cutLeft + 1
codeShowStr(result)
strShowString("72 101 108 108 111 44 87 111 114 108 100 33")