python: CSV データの書き込み/読み込み

#スニペット

<br />
def loadCSV(name):<br />
 with open(name + '.csv', 'rb') as f:<br />
 reader = csv.reader(f)<br />
 return list(reader)</p>
<p>def exportCSV(name,data):<br />
 with open(name+'.csv', 'w') as f:<br />
 writer = csv.writer(f, lineterminator='\n')<br />
 writer.writerows(data)<br />
 return</p>
<p>#load csv data<br />
load_data = loadCSV('name')</p>
<p>#export data to csv<br />
exportCSV('name',datalist)<br />