rhXX wrote:

> hi,
> 
> can i append a item to a list using criterias:
> 
> - UNIQUE - if there already exist don't append

 
> - SORTED - INSERT in the correct place using some criteria?

Both can be accomplished using the bisect-module. It will give you the
leftmost/rightmost insertion point for a given item and a list, and then
you have to see if it is contained in between (or something along these
lines, I hope you get the gist of it)

Diez
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to