while try 用于接受多行输入,对每一行输入进行处理

while True:
    try:
        s=input()
        # bad case 跳过空
        if s=='':
            continue
         m=len(s)%8 # 计算余数
         if m>0:
                s+='0'*(8-m) # 存在余数时补足
        # 对每一个在{i*8,i*8+8}的区间中,进行操作,linux键盘设置为us中括号缺失,请谅解
         for i in range(len(s)//8):
                print(s[i*8:(i+1)*8])
    except:
        break

by the way ,牛课真的不行,不专注核心代码和数据结构