1、说明
用于返回并删除字典中的一个键值对,一般删除字典末尾的键值对。
2、语法
dict.popitem()
3、参数
dict:字典对象。
4、返回值
返回一个(key,value)形式的键值对。
5、实例
a = {
"name":"dlrb",
"age":25,
"height":168
}
a1 = a.popitem()
print(a1)
查看更多关于python中popitem如何使用的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did182205