Loading...
The Odd Filter
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- junior, mid
Problem
Given a string of digit characters (e.g. '1234567'), return a new string containing only the odd digits, preserving their original order. If there are no odd digits, return an empty string.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.