Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - I am learning python. There are two sentences in the tutorial that I can't understand. Please give me your advice.
I am learning python. There are two sentences in the tutorial that I can't understand. Please give me your advice.
% 2d-% 02d“%”(3, 1)

D is a numeric integer.

%02d indicates that the output is no less than two digits, and the digits less than two digits start with 0.

F is a floating-point decimal.

%.2f means to keep 2 decimal places, rounding, .3f means to keep 3 decimal places.