Re: [python-win32] Identify unique data from sequence array

2010-12-22 Thread otrov
> 1. Start with the first element (call it L) > 2. Scan downwind for an matching element (call it R) > 3. Compare L+1 and R+1 until you find a mismatch -- that's the current > "largest" match. > 4. Repeat from 2 to see if you can find a longer match. Actually, step "4. Repeat from 2...", can be fu

Re: [python-win32] Identify unique data from sequence array

2010-12-22 Thread otrov
> I'm a unix guy. That's what we call a sort-uniq operation, after the > pipeline we'd use: sort datafile | uniq > uniq-lines.txt. So I google that > with python and > As Jason Petrone wrote when he withdrew PEP 270 in > http://www.python.org/dev/peps/pep-0270/: > "creating a sequence wi

[python-win32] Identify unique data from sequence array

2010-12-22 Thread otrov
Hi, I failed in my first idea to solve this problem with matlab/octave, as I just started using this tools for data manipulation, and then thought to try python as more feature rich descriptive language and post this problem to python group I'm subscribed already Let's consider this simple dict