HJ4 字符串分隔 ljust()函数是一个填充函数,str1.ljust(8,“0”)是指让str1靠左对齐,不足8位时剩下的用0填充 str1 = input() while len(str1)>8: print(str1[:8]) str1 = str1[