By What They Answer To
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant feedback.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L3
Problem
A stream of event-type names comes off the message bus, and you want them filed into families by the letter they start with. Group `events` by their first character into a dict, keeping each group in the order the names arrived.
Summary
Every name reports to its first letter. Sort the roll call as it comes in.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and checks it automatically.