Values and collection semantics
Input file content begins as text, so numeric fields require deliberate conversion. Lists preserve order and repetition, dictionaries map named keys, sets deduplicate and tuples group fixed sequences. Select a representation according to what information must survive, not the shortest syntax. Preserve every log row in a list, count statuses in a dictionary and use a set only for distinct paths rather than event totals. Correct representations keep aggregate meaning intact and prevent a parser from losing repeated requests or interpreting a numeric-looking string as an integer prematurely. Do not convert an event list to a set before counting requests; that removes duplicate observations and can silently underreport identical requests.
Preserve every log row in a list, count statuses in a dictionary and use a set only for distinct paths rather than event totals.
Correct representations keep aggregate meaning intact and prevent a parser from losing repeated requests or interpreting a numeric-looking string as an integer prematurely.
Do not convert an event list to a set before counting requests; that removes duplicate observations and can silently underreport identical requests.