see part in appendix for the solutions import basics write program that counts the lines and characters in file (similar in spirit to part of what wc does on unixwith your text editorcode python module called mymod py that exports three top-level namesa countlines(namefunction that reads an input file and counts the number of lines in it (hintfile readlines does most of the work for youand len does the restthough you could count with for and file iterators to support massive files tooa countchars(namefunction that reads an input file and counts the number of characters in it (hintfile read returns single stringwhich may be used in similar waysa test(namefunction that calls both counting functions with given input filename such filename generally might be passed inhardcodedinput with the input built-in functionor pulled from command line via the sys argv list shown in this formats py and reloadall py examplesfor nowyou can assume it' passed-in function argument all three mymod functions should expect filename string to be passed in if you type more than two or three lines per functionyou're working much too hard-use the hints just gavenexttest your module interactivelyusing import and attribute references to fetch your exports does your pythonpath need to include the directory where you created mymod pytry running your module on itselffor exampletest("mymod py"note that test opens the file twiceif you're feeling ambitiousyou may be able to improve this by passing an open file object into the two count functions (hintfile seek( is file rewind from/from test your mymod module from exercise interactively by using from to load the exports directlyfirst by namethen using the from variant to fetch everything __main__ add line in your mymod module that calls the test function automatically only when the module is run as scriptnot when it is imported the line you add will probably test the value of __name__ for the string "__main__"as shown in this try running your module from the system command linethenimport the module and test its functions interactively does it still work in both modes nested imports write second modulemyclient pythat imports mymod and tests its functionsthen run myclient from the system command line if myclient uses from to fetch from mymodwill mymod' functions be accessible from the top level of myclientwhat if it imports with import insteadtry coding both variations in advanced module topics