python生成6位纯数字

使用for循环生成6位纯数字,位数不足使用0填充。

for i in range(0,1000000):
i=str(i)
print(i.zfill(6))

猜你喜欢

转载自www.cnblogs.com/relax1949/p/12018291.html