题解 | #字符串分隔#

字符串分隔

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

1.获取输入
2.分隔字符串输出
def cutStr():
    while True:
        try:
            s = input()
            while len(s) > 8:
                print(s[0:8])
                s = s[8:]
            if len(s) == 0:
                pass
            else:
                print(s+'0'*(8-len(s)))
        except:
            break
            
if __name__ == "__main__":
    cutStr()

全部评论

相关推荐

gelmanspar...:奖学金删掉,自我评价删掉,简历压缩一下,写一页
如果再来一次,你还会学机...
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
昨天 15:57
小鹏汽车 java后端 22*15(固定13,2个月年终) 硕士211
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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