> from sets import Set as set # Python 2.3 > > b = list( set([i.upper() for i in b) - set([i.upper() for i in a] ) )
Just a caveat...this can change the order of items in the results as sets (and their differences) are inherently unordered data structures. If order of the items in the list need to preserved, it must remain as a list. However, if the order of the resulting list doesn't matter, this is a good solution. -tkc -- http://mail.python.org/mailman/listinfo/python-list