题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
s = input() r = s n = len(s) % 8 if n: r += '0' * (8 - n) nr = len(r) // 8 for i in range(nr): print(r[i * 8:i * 8 + 8])
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
s = input() r = s n = len(s) % 8 if n: r += '0' * (8 - n) nr = len(r) // 8 for i in range(nr): print(r[i * 8:i * 8 + 8])
相关推荐