Set .discard(), .remove() & .pop()

  • + 1 comment

    This question and solution needs to be updated as it depends on pop() removing a specific element. However, by definition the pop() method is used to remove and return an arbitrary element from a set. So in my case my solution results in 6 instead of the expected 4.