摘要: # dic={"易大师":"剑圣","剑豪":"托儿索","草丛伦":"大保健"}# ret = dic.pop("易大师")#通过key删除 返回删除的vale# print(ret)# del dic['剑豪']# print(dic)# dic.clear()# print(dic)# ret 阅读全文
posted @ 2018-08-01 16:28 刘文文先生 阅读(186) 评论(0) 推荐(0) 编辑
摘要: lst=["找死","哈哈0","黄渤"]lst.append("你好")#加到后面lst.insert(1,"王力宏")#加到指定位置lst.extend(["马化腾","哼哼","去死吧你"])#迭代 加入列表print(lst) data=lst.pop(2) #返回被删除的数据print(d 阅读全文
posted @ 2018-07-31 11:40 刘文文先生 阅读(191) 评论(0) 推荐(0) 编辑