擅长:python、mysql、java
<p>这是一个不需要使用csv模块的解决方案</p>
<pre><code>with open('test.txt', 'r') as data: #using the with keyword ensures files are closed properly
for line in data.readlines():
parts = line.split(',') #change this to whatever the deliminator is
print parts[0], parts[1] # parts[0] is the first column and parts[1] is the second column
</code></pre>