Complete Guide For Python Programming (2015)
PRINTF FORMAT STRINGS
%d : integer
%5d : integer in a field of width 5 chars
%-5d : integer in a field of width 5 chars, but adjusted to the left
%05d : integer in a field of width 5 chars, padded with zeroes from the left
%g : float variable in %f or %g notation
%e : float variable in scientific notation
%11.3e : float variable in scientific notation, with 3 decimals, field of width 11 chars
%5.1f : float variable in fixed decimal notation, with one decimal, field of width 5 chars
%.3f : float variable in fixed decimal form, with three decimals, field of min. width
%s : string
%-20s : string in a field of width 20 chars, and adjusted to the left
All materials on the site are licensed Creative Commons Attribution-Sharealike 3.0 Unported CC BY-SA 3.0 & GNU Free Documentation License (GFDL)
If you are the copyright holder of any material contained on our site and intend to remove it, please contact our site administrator for approval.
© 2016-2026 All site design rights belong to S.Y.A.