(continued from previous page invoke class-method for printing heading out_format heading(col_nameclass is passed to out_format for in list_namestore row in list row_data [str(getattr(lc)for in col_nameout_format row(row_datapass rows to class-method row( def main()list correct types of columns in csv file types =[strstrfloatfloatint read file and save data in list list_data read_file('price csv'types formatted output print_table(list_dataprint(print_table(list_data['metal''radius''price']out_format=textformat() print in file out_file open("text_format txt"" "open file in write mode print_table(list_data['metal''radius''price']out_format=textformat(out_file=out_file)out_file close( print in file with width out_file open("wide_text_format txt"" "open file in write mode print_table(list_data['metal''radius''price']out_format=textformat(width= out_file=out_file)out_file close( print(print_table(list_data['metal''radius''price']out_format=csvformat()print in file out_file open("csv_format csv"" "open file in write mode print_table(list_data['metal''radius''price']out_format=csvformat(out_file=out_file)out_file close( if __name__ ='__main__'main(following are the outputs of the above listing notethe previous main function is also working fine this check is very important to confirm that the codes of the exitsting user will not bread due to updating of the design python contributor py metal gold silver iron gold radius price (continues on next page advance inheritance