← Questions

Parse a custom record format with mapped fields

0
NetflixCodingLast asked Sep 2026

Parse records written in a custom text format: a few fixed comma-separated fields first (for example a machine code, a timestamp and two coded fields), then a free-form section of key: value pairs between markers, where a value can be a nested list. Some fixed fields and all free-form keys must be translated through given mappings or enums. Return a structured record, and handle malformed input with clear errors.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding