title: how to export two columns to csv in python
body: <p>I am not familiar with how to export the list to the <code>csv</code> in python. Here is code for one list:</p>
  
  <pre><code>import csv
  X = ([1,2,3],[7,8,9])
  Y = ([4,5,6],[3,4,5])
  for x in range(0,2,1):
      csvfile = "C:/Temp/aaa.csv"
      with open(csvfile, "w") as output:
          writer = csv.writer(output, lineterminator='\n')
          for val in x[0]:
              writer.writerow([val])
  </code></pre>
  
  <p>And I want to the result:</p>
  
  <p><a href="https://i.stack.imgur.com/kqiIN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kqiIN.png" alt="enter image description here"></a>  </p>
  
  <p>Then how to modify the code(the main problem is how to change the column?)</p>