title: How to trim leading and trailing whitespaces in csv file?
body: <p>hi wanna to remove leading and trailing spaces in csv files </p>
  
  <pre><code>24333,   116,    47,MCD,00000000000000000017996,   112
  24333,   116,    47,MCD,00000000000000610036485,   112  
  24333,   116,    47,MCD,00000000000000610036485,   112
  </code></pre>
  
  <p>can any one help the code i tried </p>
  
  <pre><code>import csv
  
  csvfile= open('strip.csv','r')
  csvfile1= open('strip11.csv','w') 
  stripped = (row.strip() for row in csvfile)
  reader = csv.reader(stripped,delimiter=' ')
  writer= csv.writer(csvfile1)
  for row in reader:
     writer.writerow(row)
  </code></pre>