题解 | #字符串分隔#

字符串分隔

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

def string_outprint(str1):
    if len(str1)<8:
        print(str1+"0"*(8-len(str1)))
    elif len(str1)>8:
        print(str1[0:8])
        return string_outprint(str1[8:])
    elif len(str1)==8:
        print(str1)

str1=input()
string_outprint(str1)

全部评论

相关推荐

如题
投递阿里巴巴集团等公司10个岗位 >
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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