python
Your answer
from collections.abc import Set
class FeatureSet(Set):
def __init__(self, features):
self._features = frozenset(features)
features = FeatureSet(["search", "export", "search"])
other = FeatureSet(["export", "share"])
print(sorted(features & other))
print(features.isdisjoint({"share"}))
print(len(features))
Set relies on membership, iteration, and size; its mixin uses these methods to provide intersection and isdisjoint(). The constructor accepts an iterable so the default _from_iterable() implementation can create result objects.
Hint: Implement __contains__ by checking self._features, return an iterator over self._features, and return its length from __len__().