[Python] format function for formatting output

function is used to format the output string formatted 

  • The basic format is  str . Format       

 

Wherein, 0 and 1 represent the format of the first and second parameters; .2f representative of two decimal places

 

Guess you like

Origin www.cnblogs.com/onlyway/p/12598225.html