题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
import sys for i, line in enumerate(sys.stdin): a = line.strip() result = [a[j:j+8] if j+8 <= len(a) else a[j:] + "0"*(8-len(a)%8) for j in range(0,len(a),8)] for item in result: print(item)