python print 追加写入文件中
f=open('test.txt','a+w')
s= '123'
abc= '456'
print >> f, s,abc
f.close()
或者
f=open('output.csv','a+w')
print >>f, tmptracid +","+ tpye +","+model+ "," + summary + "," + author
f.close()
r 读
w 写
a 追加
上面参数可以选择
f=open('test.txt','a+w')
s= '123'
abc= '456'
print >> f, s,abc
f.close()
或者
f=open('output.csv','a+w')
print >>f, tmptracid +","+ tpye +","+model+ "," + summary + "," + author
f.close()
r 读
w 写
a 追加
上面参数可以选择