my_dictpopold_key
If the key 'old_key' is present in the dictionary my_dict, the pop() method will remove the key-value pair associated with 'old_key' from the dictionary and return the corresponding value.
If the key 'old_key' is not present in the dictionary, the pop() method will raise a KeyError.
原文地址: https://www.cveoy.top/t/topic/iM5s 著作权归作者所有。请勿转载和采集!