网站介绍:'''原字符串左侧对齐, 右侧补零:'''str.ljust(width,'0')input: '789'.ljust(32,'0')output: '78900000000000000000000000000000''''原字符串右侧对齐, 左侧补零:方法一:'''str.rjust(width,'0')input: '798'.rjust(32,'0')out..._python 补全6位
- 链接地址:https://blog.csdn.net/weixin_30888707/article/details/101585124
- 链接标题:python-字符串处理-字符串补全填充固定长度(补0)的三种方法-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:4163
- 网站标签:python 补全6位