# 字符串分隔,用正则实现每8个字符插入一个换行符 import re while True: try: a = input() len1 = len(a) if len1<8: a=a+('0'*(8-len1)) elif len1>8: a=re.sub(r"(.{8})","\\1\n",a) a=a+'0'*(8-(len1%8)) ...