micropython里没有zfill。
用这个函数代替:
str = "2" def zfl(s, width): return '{:0>{w}}'.format(s, w=width) print(zfl(str,5))
@kidswong999 在 [zfill函数无法使用](/post/18150) 中说:
> zfl(str,5)
好的谢谢