$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #29

Fill the operator to check the stack is empty.

return len(stack) ____ 0   # is it empty?

Answer: == (also accepted: ==)

len(stack) == 0 is true when the stack is empty (valid parentheses).
Play Problem Solving ▸