pop()函数是python解释器的内置方法,可作用于列表,字典。pop为“弹出”之意。

用法说明——

在builtins.py中找到pop函数。

列表:

L.pop([index]) -> item -- remove and return item at index (default last).

Raises IndexError if list is empty or index is out of range.

移出并返回L中索引的值,在L为空或超出索引时抛出错误。