You must write a Python script /app/topk.py that reads a large input text file line by line, computes the…
You must write a Python script /app/topk.py that reads a large input text file line by line, computes the…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin or first argument): Path to a text file. The file may be arbitrarily large; do NOT load…
The task
**Input format (stdin or first argument):** Path to a text file. The file may be arbitrarily large; do NOT load it entirely into memory. Each line is a sequence of whitespace-separated tokens. Tokens are case-sensitive. A "token" is any non-empty maximal sequence of non-whitespace characters. The file may contain…
Part of ai-and/termgrade-environments.