Skip to main content

Practice ยท 2 of 3

Streaming Word Count

Implement count_words(paths) where paths is a list of text files. Stream every file line by line (never read_text the whole file) and return the total count of whitespace-separated tokens across all files.

Difficulty: intermediate

Back to lesson: Practice: Streaming Drills