1. String formatting symbols meaning
%c: Formatting characters and their ASCII code
%s: Formatted string
%d: Formatted integer
%o: Formatting unsigned octal numbers
%x: Formatting unsigned hexadecimal numbers
%x: Formatting unsigned hexadecimal number (uppercase)
%F: Format fixed-point number to specify the precision after the decimal point
%e: Formatting fixed-point numbers with scientific notation
%E: function with%E, format fixed-point number with scientific notation
%g: Depending on the size of the value, use%f live%e
%G: function with%G, depending on the size of the value to use%f or%e
2. Formatting operator Auxiliary Instructions
M.n:m is the smallest total width displayed, and n is the number of digits after the decimal point
-: For left alignment
+: Show plus sign (+) before positive number
#: Display ' 0o ' before octal number, ' 0x ' or ' 0X ' before hexadecimal number
0: Display number preceded by ' 0 ' to replace space
Python string formatting symbols