thank you again: i used list and not set because order in my list is important. in fact i'd like to apply this function to strings (or ordered sequences of data). For this reason proposed to use regular expression. best regards.
-- http://mail.python.org/mailman/listinfo/python-list