DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Spaces Between

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
L3

Problem

Raw access-log lines come in with inconsistent spacing: some fields are padded with extra spaces, and lines often carry leading or trailing whitespace. Break each `line` into its space-separated fields, dropping the empty gaps so only the real tokens remain, and return an empty list when the line holds nothing but whitespace.

Summary

Raw lines arrive padded and uneven. Recover the fields that matter.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons