How can I find the missing value more concisely?
z = (set((“a”, “b”, “c”)) – set((x, y))).pop() I am assuming that one of the three cases in your code holds. If this is the case, the set set((“a”, “b”, “c”)) – set((x, y)) will consist of a single element, which is returned by pop(). Edit: As suggested by Raymond Hettinger in the comments, you … Read more