title: Python TypeError: '_csv.writer' object is not iterable
body: <p>I am parsing json to csv. But am getting error as below:</p>
  
  <pre><code>for i in data:
  TypeError: '_csv.writer' object is not iterable
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>import json
  import csv
  
  with open("Data.json", 'r') as file:
      data = json.load(file)
  
  CSV_File = 'Data.csv'
  
  with open(CSV_File, 'w') as file:
      data = csv.writer(file)
      data.writerow([])
  for i in data:
      data.writerow([])
  </code></pre>
  
  <p>Data</p>
  
  <blockquote>
    <p>{
       "id": "kljhfksdhkhd",
       "name": "BOB",
       "birthday": "08/03/1993",
       "languages": [
          {
             "id": "106059522759137",
             "name": "English language"
          },
          {
             "id": "107617475934611",
             "name": "Telugu language"
          },
          {
             "id": "112969428713061",
             "name": "Hindi"
          },
          {
             "id": "343306413260",
             "name": "Tamil language"
          },
          {
             "id": "100904156616786",
             "name": "Kannada"
          }
       ],
       "games": {
          "data": [
             {
                "name": "Modern Combat",
                "id": "12134323",
                "created_time": "2019-02-21T18:39:41+0000"
             },
             {
                "name": "Cards",
                "id": "343232",
                "created_time": "2011-06-01T11:13:31+0000"
             },
             {
                "name": "Shuttle Badminton",
                "id": "43214321",
                "created_time": "2011-06-01T11:13:31+0000"
             },
             {
                "name": "Carrom",
                "id": "49y497",
                "created_time": "2011-06-01T11:13:31+0000"
             },
             {
                "name": "Chess",
                "id": "0984080830",
                "created_time": "2011-06-01T11:13:31+0000"
             }
          ],
          "paging": {
             "cursors": {
                "before": "dkkskd",
                "after": "dlldlkd"
             }
          }
       }
    }</p>
  </blockquote>