title: why can't I see the extra line when I directly open the csv file?
body: <p>I'm learning python on Windows and I met a problem when creating a csv file.
  Here is the code</p>
  <pre><code>import csv
  
  with open(&quot;data.csv&quot;, &quot;w&quot;) as file:
      writer = csv.writer(file)
      writer.writerow([&quot;trasaction_id&quot;, &quot;product_id&quot;, &quot;price&quot;])
      writer.writerow([1000, 1, 5])
  </code></pre>
  <p>When I open data.csv in VSCode, I get an extra line:</p>
  <pre><code>trasaction_id,product_id,price
  
  1000,1,5
  </code></pre>
  <p>I know this problem can be solved by adding <code>newline=&quot;&quot;</code> in the open() function. But I don't understand why I can't see the extra line when I directly open this file with Notepad?</p>