title: how to align data in CSV file using python
body: <p>I'm using following code to write data into csv file:</p>
  
  <pre><code>filename = "DETAILS.csv"
  f = open(filename, "a")
  f.write(
      school_name + "," + affiliation_no + "," + state + "," + district + ","   
      + postal_address + "," + phone_no + "," + email_id + "," + web_site + "," 
      + year_of_foundation + "," + date_of_opening + "," + name_of_principal + ","
      + status_of_school + "," + type_of_affiliation + "," + affiliation_period_from + ","
      + affiliation_period_to + "," + name_of_trust_society_managing_committee + "\n")
  
  f.close()
  </code></pre>
  
  <p>I'm getting the output in this format:</p>
  
  <p><img src="https://i.stack.imgur.com/ajhPm.png"/></p>
  
  <p>The columns and data are not aligned in csv file.I need one row per each entry. Can anyone help me fix it?</p>