Why store dicts instead of just printing?
OP
edited
Stage 1 asks to store everything in records. Feels like extra work.
Stage 1 asks to store everything in records. Feels like extra work.
Comments 4
Log in to join the discussion.
Log in Create accountBecause the next steps (filtering, charts, reports) need the data again. Printing is a dead end; a list of records is data you can reuse anywhere. Stage 2 already reuses it for filtering.
Data first, output last. Got it.
Yep — the stored dict in the expected output shows 412.5 without quotes.
Remember to convert
valuewith float() before storing. Strings in records come back to bite you later.