摘要: a={'a':{'b':'oo'},'c':{'d':'袁珂'}}#del a['a']a.pop('a') #标准姿势print(a.get('c'))print(a.get('a'))print(a.setdefault('f','逯晓华'))print(a['f'])print(a.setde 阅读全文
posted @ 2018-06-15 22:18 没有永远的小白 阅读(108) 评论(0) 推荐(0) 编辑
摘要: file=open('yesteerday','r',encoding='utf-8') file_new=open('yesteerday1','w',encoding='utf-8') for line in file: if "逯晓华" in line: line=line.replace('逯晓华','hello 逯晓华') time_import='%Y... 阅读全文
posted @ 2018-06-15 10:53 没有永远的小白 阅读(79) 评论(0) 推荐(0) 编辑