题解 | 字符串分隔
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
str = input()
list1 = list(str)
l = len(str)
t = 8 - (l % 8)
while t > 0:
list1.append('0')
t -= 1
for j in range(0, l, 8):
print(''.join(list1[j:j+8]))
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
str = input()
list1 = list(str)
l = len(str)
t = 8 - (l % 8)
while t > 0:
list1.append('0')
t -= 1
for j in range(0, l, 8):
print(''.join(list1[j:j+8]))
相关推荐