1 2 3 4 5 6 7 8 9
s = {1} print(s.pop()) try: print(s.pop(), "!!!") except KeyError: pass else: print("Failed to raise KeyError")