# == example
a = [1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789]
frmt = "{:010d}"
[frmt.format(i) for i in a]
['0000000001',
'0000000012',
'0000000123',
'0000001234',
'0000012345',
'0000123456',
'0001234567',
'0012345678',
'0123456789']
# --- field calculator useage
"{:010d}".format(!YourFieldWithNumbers!)
... sort of retired...