摘要: 一、增加一个或多个元素 d = {'a': 1} d.update(b=2) #也可以 d.update({‘b’: 2}) print(d) # {'a': 1, 'b': 2} d['e'] = 5 print(d) #{'a': 1, 'b': 2,'e':5} d.update({'f': 阅读全文
posted @ 2019-11-05 11:03 K_Code 阅读(4998) 评论(0) 推荐(0)