def rowset(results):
 return set([tuple(row) for row in results])

def rowset ( results ) : return set ( [ tuple ( row ) for row in results ] )
converts the results of sql execution into a plain set of column tuples .