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

  • + 0 comments

    how does pop() method work in sets if it is unordered ? why is it set working like an ordered data structure in this question when I am running test cases and changing the last number in my input, pop always removs the last element, how does it know if it is not iterable ?