add zero in front of single digit python code example Example: how to append leading zeros in python str.zfill(width)