If the file's path is in a string bound to the thefilepath variable, that's just: count = len(open(thefilepath).readlines( )). For a truly huge file, ...
確定! 回上一頁