Commit fb28df93 authored by Stephen Pearce's avatar Stephen Pearce Committed by Maxim Belkin

code/line_count.py: Update loop variable names (#754)

parent 60c66ed7
......@@ -13,10 +13,10 @@ def main():
sum_nlines = count_file_like(sys.stdin)
print('stdin: %d' % sum_nlines)
else:
for f in filenames:
n = count_file(f)
print('%s %d' % (f, n))
sum_nlines += n
for filename in filenames:
nlines = count_file(filename)
print('%s %d' % (filename, nlines))
sum_nlines += nlines
print('total: %d' % sum_nlines)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment