Skip to content

Commit 82a6800

Browse files
committed
setting up a helper function that handles reading files, printing stats and updating total
1 parent e3a7ce3 commit 82a6800

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • implement-shell-tools/wc

implement-shell-tools/wc/wc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ def counter(item):
2121
return {"lines": lines, "words": words, "characters": characters}
2222

2323

24+
def process_file(file_path):
25+
global total_lines, total_words, total_characters, file_count
26+
27+
2428
total_lines = 0
2529
total_words = 0
2630
total_characters = 0

0 commit comments

Comments
 (0)