(continued from previous page ''calculate the total cost '' total_price for all items in the list with open(filename' 'as fopen file in read mode rows csv reader(fheader next(rowsskip line header for row in rowsrow[ float(row[ ]price row[ int(row[ ]quantity total_price +row[ row[ print("total price % ftotal_pricereturn total_price return total_price def main()total ring_cost('price csv'function call print("total price % totalprint value standard boilerplate main is the starting function if __name__ ='__main__'main(python price py total price debugging in listing we have to manually change the file name in the 'price pyfilewhereas in listing we can pass the filename as the parameter in the section as shown belowpython - price py total price ring_cost('price csv' ring_cost('price csv' notein the above command'python - price py'the main(function is called and after entering the python shellwe can call the function directly ring_cost('price csv')and the corresponding 'return value' will be printed in the shell glob module 'globmodule can be used to select the files for further processingas shown in this section to understand itfirst create some files as belowtouch data txt data txt data txt data_ txt data_ txt data_ txt data csv data csv data csv nextopen the python shell and see the following function of 'globmodule glob module