读取csv文件: def readCsv(): rows=[] with file(r'E:\py\py01\Data\system.csv','rb') as f: reads=csv.reader(f) for i in reads: rows.append(i) print rows return rows写入csv文件: def writer(): with file(r'E:\py\py01\Data\system.csv','wb') as f: writer=csv.writer(
package com.Cristin.File;//将数据库里的数据写入到指定路径的txt文件里 import java.io.File;import java.io.FileOutputStream;import java.io.IOException;import java.io.OutputStreamWriter; /** * Created by cristin on 2017/8/2. */ public class FileWriter { /** * 将查询出来的内容写入指定路