code: def pop(self):
          
          try:
              x = next(iter(self))
              self.remove(x)
              return x
          except StopIteration:
              raise KeyError('pop from an empty set')
docs: Pops the first element