python (although not very pythonic) brainfuck implementation