首页 > python杂谈 >
想通过str.format()实现将三位以内的数字转换为前面补零的格式,如9→00919→019119→119请问该怎么写?
'{:03d}'.format(9)
Posted on 2013-12-10 星期二