python中的clear clear()清空字典中的所有内容 1 a = { 2 "name":"dlrb", 3 "age":25, 4 "height":168 5 } 6 a.clear() 7 print(a) 输出结果: {}