def countLines(fn): ... def countChars(fn): ... def tester(): print(countChars('mods.py')) r'C:\new\text'