s = set('ABC') t = frozenset('BCD') print s == t print s != t u = frozenset(s) print s == u set('posh') == set('BC')