%.2d indicates that the length of the output result is 2, those that do not meet the length are filled with 0, and those that meet and exceed the length of 2 are filled with themselves.
For example:
Print ("%.2d"% 3. 14 15) Result: 03.
Print ("%.2d"%3) Result: 03.
Print ("%.2d"% 123) Result: 123.