I am a Python newbie and I came across this exercise of checking whether or not the simple brackets \"(\", \")\" in a given string are matched evenly.
I have seen ex
The problem with your approach is that you don't consider the order. Following line would pass: ))) (((.
I'd suggest to keep the count of open and closed parenthesis:
counter starts from 0( symbol increment counter) symbol decrements counter