We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8941fb commit f654716Copy full SHA for f654716
implement-shell-tools/wc/wc.py
@@ -27,7 +27,7 @@
27
28
if not args.w and not args.c and not args.l:
29
args.w = args.c = args.l = True
30
-numbers = []
+per_file_totals = []
31
output = []
32
column_widths = []
33
for path in args.path:
@@ -54,11 +54,11 @@
54
output_for_one_file.append(file_size)
55
56
if len(args.path) > 1:
57
- numbers.append(output_for_one_file.copy())
+ per_file_totals.append(output_for_one_file.copy())
58
output_for_one_file.append(path)
59
output.append(output_for_one_file)
60
61
- total_results = [sum(i) for i in zip(*numbers)]
+ total_results = [sum(i) for i in zip(*per_file_totals)]
62
total_results.append("total")
63
output.append(total_results)
64
0 commit comments