为什么调用 .pop() 时空集和列表会引发不同的异常?
>>> l = []
>>> l.pop()
Traceback (most recent call last):
File "<pyshell#15>", line 1, in <module>
l.pop()
IndexError: pop from empty list
>>> l = set()
>>> l.pop()
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
l.pop()
KeyError: 'pop from an empty set'