字符串---续1

 zfill() 方法返回指定长度的字符串,原字符串右对齐,前面填充0。

shell实验

str3 = "this is string example....wow!!!"

>>> str3.zfill(40)
'00000000this is string example....wow!!!'

猜你喜欢

转载自blog.csdn.net/areigninhell/article/details/79990065