Mirco Wahab wrote: > I have no idea how to do this > in Python in a terse way - but > I'll try ;-) > > In Perl, its easy. Here, the > "match construct" (\w)(?=(.)\1) > returns all captures in a > list (a 1 a 2 a 4 b 7 c 9)
Ah, I see the difference. In Python you get a list of tuples, so there seems to be a little extra work to do to get the number out. -- http://mail.python.org/mailman/listinfo/python-list