摘要: 查看字典内部方法,使用help(list)、dir(list)来查看。 1、clear:清除字典所有内容 D.clear() -> None. Remove all items from D. dic1 = {'k1':'v1','k2':'v2'} dic1.clear() print(dic1) 阅读全文
posted @ 2017-11-09 20:25 是梦别喊疼、 阅读(1069) 评论(0) 推荐(0) 编辑