introductionbracket syntax {iprovides placeholder for the -th variable to be printedwith being the first index the format for the output is further specified by { :format}where format is typically of the form[width]precision][typein this specificationwidth specifies the minimum width of outputprecision specifies the number of digits to be displayed after the decimal point for floating point values of type for the number of digits before and after the decimal point for floating point values of type gtype specifies the type of output the most common types are for stringsd for integersb for binary numbersf for floating point numbers (floatsin fixed-point notationg for floats in general notatione for floats in scientific notation the following illustrates some behavior of formatting on numbers '{: }format ( '{ }format ( '{ }format ( '{ }format ( '{ }format ( '{ }format ( '{ }format ( '{ : }{ };format ( ' + ' ' ' ' ' + ' - the following code reads the text file output txt line by lineand prints the output on the screen to remove the newline \ characterwe have used the strip method for stringswhich removes any whitespace from the start and end of string fin open('output txt ',' 'for line in finline line strip (strips newline character print (linefin close ( more formatting options are possible