num_col = 0;
with open('xxx/xxx.xxx','rb') as fi:
while(fi.readline() !=''):
num_col = num_col + 1;
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