大家看看这段代码为什么会出现问题
import sys f=open('yestday3','r') f_new=open('yestday3','w') fid_str = sys.argv[1] replace_str = sys.argv[2] for line in f: if fid_str in line: line=line.replace(fid_str,replace_str) f_new.write(line) f.close() f_new.close()
import sys f=open('yestday3','r') f_new=open('yestday3','w') fid_str = sys.argv[1] replace_str = sys.argv[2] for line in f: if fid_str in line: line=line.replace(fid_str,replace_str) f_new.write(line) f.close() f_new.close()
2019-05-28
举报