def string_depart(s): //按照8来切片进行分组,并使得不足八位的用0补齐这里主要是ljust,如果在前面补齐就用rjust s2 = [s[i:i+8].ljust(8,'0') for i in range(0,len(s),8)] return s2 s = input().strip() s3 = string_depart(s) for i in s3: print(i)