title: How to count number of columns in each row?
body: <p>Each rows have different number of columns but Column A is always file name and rest of columns are fields of that file.</p>
  
  <p>Is there any way I could count number of columns for each row? </p>
  
  <pre><code>import csv
  file=('C:/)
  with open('C:/Count.csv','w',encoding='cp949',newline='') as testfile:
      csv_writer=csv.writer(testfile)
      for line in file:
          lst=[len(line)]
          csv_writer.writerow(lst)
  </code></pre>