LockedIn supports a basic scripting language. It allows technically savvy HR managers to write scripts that can automate repetitive tasks on the platform. The language makes use of parentheses to group operations together, and we need to be able to check if the parentheses in a script are balanced.
Parentheses are balanced when each parenthesis has a corresponding parenthesis, and the pairs of parentheses are properly nested. For example:
()()()((()))(()(()))(())(()()(()))Complete the is_balanced function.
It takes a string as input and returns True if the parentheses in the string are balanced, and False otherwise. Use an instance of the provided Stack class in stack.py to keep track of the parentheses.
You only need to consider the characters ( and ) for this challenge.