classMyHashSet:def__init__(self):"""
Initialize your data structure here.
"""
self.set=[False]*1000001defadd(self, key:int)->None:
self.set[key]=Truedefremove(self, key:int)->None:
self.set[key]=Falsedefcontains(self, key:int)->bool:"""
Returns true if this set contains the specified element
"""return self.set[key]# Your MyHashSet object will be instantiated and called as such:# obj = MyHashSet()# obj.add(key)# obj.remove(key)# param_3 = obj.contains(key)