Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple and only 5 lines! solution in Clear category for Brackets by texom512
def checkio(str):
str = ''.join([c for c in str if c in '()[]{}'])
while any(b in str for b in ('()', '[]', '{}')):
str = str.replace('()', '').replace('[]', '').replace('{}', '')
return not str
Aug. 16, 2015
Comments: