popitem()随机删除字典中的任意键值对,并返回到元组中
1 a = { 2 "name":"dlrb", 3 "age":25, 4 "height":168 5 } 6 a1 = a.popitem() 7 print(a1)
输出结果:
('age', 25)
popitem()随机删除字典中的任意键值对,并返回到元组中
1 a = { 2 "name":"dlrb", 3 "age":25, 4 "height":168 5 } 6 a1 = a.popitem() 7 print(a1)
输出结果:
('age', 25)