Max Length Token
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 a string, split on whitespace and return the longest token. If multiple tokens tie for longest, return the first one.
Summary
The longest token wins.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.