Skip to content

Instantly share code, notes, and snippets.

View main.py
import copy
#given the position of one braket, the program has to output the position of the matching bracket
#EDIT: I did it yes finally!
def find_parens(s):
toret = {}
pstack = []
for i, c in enumerate(s):
if c == '[':