Loading...

The Syntax Sentinel

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

Our config parser validates template strings before deployment. Write a function called is_balanced that takes a string containing brackets and returns True if every opening bracket has a matching closing bracket in the correct order. The string may contain (), [], and {} pairs, plus other characters that should be ignored.

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.