题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
s = input() n = int(len(s) / 8) x = len(s) % 8 n = n + 1 if x == 0: for i in range(0, n): s1 = s[i * 8:(i + 1) * 8] print(s1) if x != 0: for i in range(0, n - 1): s1 = s[i * 8:(i + 1) * 8] print(s1) s3 = s[(n-1)*8:] for j in range(0, 8 - len(s3)): s3 += '0' print(s3)