DataDrivenDataDriven
LearnPracticeInterviewDiscussDailyJobs

Where the Lines Break

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

Domain
Python
Difficulty
easy
Seniority
L3

Problem

Access-log lines arrive with ragged whitespace: fields run together under uneven spacing and stray leading or trailing gaps. Break each `line` into its whitespace-separated fields, keeping only the real tokens, and hand back an empty list when a line holds nothing but whitespace.

Summary

Every record hides its fields behind noise. Pull the real ones loose.

Practice This Problem

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

Related

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