r/programming • • Dec 01 '15

Daily programming puzzles at Advent of Code

http://adventofcode.com/
320 Upvotes

179 comments sorted by

View all comments

Show parent comment

1

u/AShortFucker Dec 01 '15

A bit simpler: tr = {'(': 1, ')':-1} sum(tr[c] for c in input)