Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Not a Fast solution solution in Clear category for Brackets by WenlinChang
def checkio(expression):
exp = ''.join([p for p in expression if p in ['(','[','{','}',']',')']])
while any(['()' in exp, '[]' in exp, '{}' in exp]):
exp = exp.replace('()','').replace('[]','').replace('{}','')
return True if exp == '' else False
Nov. 14, 2015