主页
Python
Python String zfill() 方法
demo_ref_string_zfill2
运行 ❯
×
更改方向
保存代码
更改主题
a = "hello" b = "welcome to the jungle" c = "10.000" print(a.zfill(10)) print(b.zfill(10)) print(c.zfill(10))
00000hello
welcome to the jungle
000010.000