题解 | #字符串分隔#
字符串分隔
http://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
def str_split(): s = "" try: while True: input_str = input().strip() if not input_str: break if len(input_str) % 8 != 0: input_str += ((8 - len(input_str) % 8)) * "0" s += input_str except: pass for i in range(0, len(s) // 8): if i == 0: print(s[0: 8]) else: print(s[i * 8: (i + 1) * 8]) str_split()