The File Size Profiler
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L3
Problem
Given entries (list of 'filepath size_bytes timestamp' strings), sum size_bytes per file extension (everything after the last '.' in the filename). Files without an extension (no '.' in basename) are grouped under the key 'no_extension'. Return a dict mapping each extension (or 'no_extension') to the total size.
Summary
File types and their disk footprint. One type dominates.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.