pta里面的输出最后应该是没有空格的,for循环改一下有帮助望采纳!谢谢
for i in range(len(b)): if i == len(b) -1: print(b[i]) else: print(b[i],end='')