I like sets a lot. Most people just use them for calculating unique values, but the real power is in using the set()'s union, intersect, difference, etc. functions... Extreemly fast and efficient!
One practical example I use this for is I have this large polygon layer I need to convert to raster in order to get elevation and slope values (from a DEM) using zonal statsistics. A number of the polygons (20% or so) are too small to be converted to a raster, and for those, I still need to get spot elevation and slope values for the centroids via the Sample tool.
Basically I make a set for the OIDs for all my original polygons, and another set for the VALUEs of the raster version (which are the OIDs that "made it" to the raster). Now I need to figure out what polygons I must convert to centroids (so as to run the sample tool). BTW: Dealing with 2.5 million polgons.
For example:
>>> set1 = set((1,2,3,4,5,6,7,8,9,10)) #all the OIDs in the polygon layer
>>> set2 = set((1,2,3,7,8,9)) #the OIDs that made it to the raster layer
>>> print set1.difference(set2)
set([10, 4, 5, 6]) #The polygon OIDs that I need to derive centroids for and then use the Sample tool on