On Fri, 14 Dec 2007 08:54:58 -0800, nirvana wrote: > I need to count the number of continous character occurances(more than > 1) in a file, and replace it with a compressed version, like below > XYZAAAAAAAADEFAAcdAA --> XYZ8ADEF2Acd2A
Great. Then go ahead an implement it. :-) `itertools.groupby()` might be handy. And you have to think about digits in the source if that's allowed. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list