题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
s1=input() d=len(s1)%8 if d!=0: s1=s1+(8-d)*'0' d2=int(len(s1)/8) n=1 for i in range(d2): print(s1[(n-1)*8:n*8]) n+=1
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
s1=input() d=len(s1)%8 if d!=0: s1=s1+(8-d)*'0' d2=int(len(s1)/8) n=1 for i in range(d2): print(s1[(n-1)*8:n*8]) n+=1
相关推荐