with open("dico.txt","w") as f: for a in range(999999): f.write('{0:0>6}\n'.format(a))
'{0:0>6}\n'
{
0 = first variable
:0 = fill
> = left adjust
6 = six spaces
}
left adjust not needed for zero padding
with open("dico.txt","w") as f: for a in range(999999): f.write('{0:06}\n'.format(a))
99 percent of computer problems exists between chair and keyboard.