There are a number of ways to print a number with zero-padding (leading zeros), depending on the variable type you are wanting to print. One easy way to add zero padding to any type is to use the str(<number>).zfill(<length>). This will convert any number type to a string before adding the extra zeros. For example:

def zeroPad(number, length):
    return str(number).zfill(length)

This function can be called using many different types. We can use this function like this:

print zeroPad(123, 5)
print zeroPad(12.3, 5)
print zeroPad('123', 10)

to print this: