On Jun 6, 10:26 am, rhXX <[EMAIL PROTECTED]> wrote: > hi, > > can i append a item to a list using criterias: > > - UNIQUE - if there already exist don't append > > and/or > > - SORTED - INSERT in the correct place using some criteria? > > tks in advance
If you don't need the list to be sorted until you're done building it, you can just use: lst = sorted(set(lst)) -- http://mail.python.org/mailman/listinfo/python-list