title: Change date formats in csv with Python 3
body: <p>I need to exchange dateformats in a large csv from DD/MM/YYYY to YYYY-MM-DD.
  I have no problem printing out the values I want them to replace with, but I have a hard time actually overwriting the csv. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>import csv
  from datetime import datetime
  
  with open('partner_new_testteam.csv', newline='') as data:
      reader = csv.reader(data)
  
      for list in reader:
          for string in list:
              try:
                  datetimeobject = datetime.strptime(string, '%d/%m/%Y')
                  changedDate = datetimeobject.strftime('%Y-%m-%d')
                  print(changedDate)
  
              except:
                  continue
  </code></pre>
  
  <p>I know this code is rather sloppy, but keep in mind that I just started programming, thanks in advance!</p>