题解 | #字符串分隔#

字符串分隔

https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7

import sys

str = input()
data = []
n = int(len(str) / 8)
for i in range(n):
    print(str[i * 8:i * 8 + 8])
if len(str) % 8!=0:
    print(str[n * 8:] + (8 - len(str) % 8) * '0')

全部评论

相关推荐

解zj:但是想想也挺好的 这么多天也面了挺多家公司 也越来越有感觉了 希望明天能有一个好的结果
投递字节跳动等公司10个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务