str.ljust(width[,])函数,width是宽度,fillchar是可选参数,要填充的字符串。
str = 'lbw'
print(str.ljust(10,'0'))
输出结果:lbw0000000
str.ljust(width[,])函数,width是宽度,fillchar是可选参数,要填充的字符串。
str = 'lbw'
print(str.ljust(10,'0'))
输出结果:lbw0000000
计算某一结构体大小:方法以及规则。
python左对齐,python右对齐
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M