Results for “python dict”

Showing 31–40 of 58

  1. Challenge

    Test the parser

    …compare the whole record parse_line() returns with the dict you expect, so every field and its type are checked. When they all hold, print: All checks passed For example, a line from the feed…

    Write the code Medium 2 stages testing assert parsing None
  2. Challenge

    Sort by a field

    Sort launches by date with sorted() and a small function that returns each launch's date, then sort the cargo manifest heaviest first with a key function and reverse=True.

    Write the code Easy 2 stages functions sorted key reverse
  3. Challenge

    Missing field

    …no board at all. Predict what happens, find out what the dict really holds, fix it, then build a board that copes with any missing field. Predict and run Don't run the code yet. Read it and decide…

    Fix the code Easy 3 stages dictionaries KeyError get default values
  4. Challenge

    Alert deduplicator

    …09:33:05 COMMS Signal weak (x2) Keep the groups as dicts in a list, groups , with first , last , source , message and count , and a dict from (source, message) to the newest group for that alert…

    Write the code Hard 2 stages project dictionaries tuples as keys grouping
  5. Challenge

    Legacy script

    …output exactly as it is now: parse_feed(feed) returns a dict from each sensor to its list of values, as floats, in order; summary_line(sensor, values) returns one report line: the average rounded to…

    Fix the code Hard 2 stages project refactoring functions testing
  6. Challenge

    Sign-up cleanup

    …<minjun.kim@example.org> Keep the emails seen so far in a dict, email -> name , so a duplicate can say whose it is.

    Write the code Medium 2 stages project strings strip split