python大文件统计有多少行

num_col = 0;

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

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

    num_col = num_col + 1;

posted @ 2018-04-18 15:17  Apollo_zhanghongbo  阅读(2246)  评论(0编辑  收藏  举报