Skip to content

Instantly share code, notes, and snippets.

@AndyChenYH
AndyChenYH / main.py
Created August 31, 2018 15:22
Brainfrick interpreter created by Andi_Chin - https://repl.it/@Andi_Chin/Brainfrick-interpreter
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 == '[':