the first element in the list of list

bruno at modulix onurb at xiludom.gro
Tue Nov 22 16:04:39 CET 2005

Ben Bush wrote:
> I have a lis:
> [[1,3],[3,4],[5,6],[8,9],[14,0],[15,8]]
> I want a code

Then write it.

And when (if) you have problems with it, repost, we'll then be happy to
help you.

> to test when the difference between the first element in
> the list of list is equal to or larger than 6,

I'm afraid you will never know what that difference is... Reminds me of
zen koan saying "the difference between a bird is that it neither know
how to fly".

Note that the use of "between" usually implies a second term !-)

BTW, also note that "the first element the first element in (a) list of
list(s)" is usually (well, I'd even say "always") a list itself.

> then move the previous
> lists to the end of the list. that is:
> [[14,0],[15,8],[1,3],[3,4],[5,6],[8,9]]

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