On Sun, 17 Jul 2011 02:48:42 -0700 (PDT) Raymond Hettinger <pyt...@rcn.com> wrote:
> On Jul 17, 12:47 am, Xah Lee <xah...@gmail.com> wrote: > > i hope you'll participate. Just post solution here. Thanks. > > http://pastebin.com/7hU20NNL I'm new to Python. I think I'd have done it in a similar way (in any language). Your use of openers/closers looks nice though. In the initialization of openers, I guess you implicitly create a kind of hash, right? Then the 'in' operator checks for the keys. That is elegant because you have the openers and closers right next to each other, not in separate lists. But why do you enumerate with start=1? Shouldn't you start with index 0? -- http://mail.python.org/mailman/listinfo/python-list