Lines of Strings

bruno modulix onurb at xiludom.gro
Fri Sep 16 04:14:59 EDT 2005


Reem Mohammed wrote:
> Hi
> 
> Suppose we have data file like this one (Consider all lines as strings )
> 
> 1 2 3 3 4 4 4 4 5 6
> 2 2 2 5 5 5 6
> 3 2 1 1 1 3 3 3 4 6
> 
> I would like to remove line if its belong to another one, and will be
> able to do this if longer line come after a short one.

That's fine. Now try and do it, and ask for help when you're in trouble.

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list