python大文件统计有多少行

num_col = 0;

with open('xxx/xxx.xxx','rb') as fi:

  while(fi.readline() !=''):

    num_col = num_col + 1;

原文地址:https://www.cnblogs.com/HITSZ/p/8875045.html