擅长:python、mysql、java
<p>这是因为csv.reader期望</p>
<blockquote>
<p>any object which supports the iterator protocol and returns a string
each time its next() method is called</p>
</blockquote>
<p>您已将字符串传递给了读取器。在</p>
<p>如果你说:</p>
<pre><code>line = ['xsc_i,202,"House of Night",21,"/21_202"',]
</code></pre>
<p>您的代码应该按预期工作。
请参见<a href="https://docs.python.org/2/library/csv.html" rel="nofollow">docs</a></p>