题解 | #字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
s = input() # 重点:range(start, len, step) for index in range(0,len(s),8): # 重点:格式化输出 <左对齐,>右对齐 ^中间对齐 print(f"{s[index:index+8]:0<8}")#字符串分隔#
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
s = input() # 重点:range(start, len, step) for index in range(0,len(s),8): # 重点:格式化输出 <左对齐,>右对齐 ^中间对齐 print(f"{s[index:index+8]:0<8}")#字符串分隔#
相关推荐