title: How to print the number of columns and lines in a csv file?
body: <p>I am a Python newbie so this might sound like a silly question, but I have a CSV file and I want my script to print the number of lines and the number of columns in the file. This is my script:</p>
  
  <pre><code>import csv
  
  op = open(Test06242015.csv)
  rd = csv.reader(op)
  
  
  for row in rd:
      list = []
      list.append(row)
      print list
      for items in row:
          print len(row)
  
  op.close()
  </code></pre>
  
  <p>I am actually getting the right answer (320), but it prints out 320 times for each row (below):</p>
  
  <pre><code>[['19.385', '19.227', '18.308', ...]]
  320
  320
  320
  320
  320
  320
  320
  320
  (...and it keeps going)
  </code></pre>
  
  <p>How can I make it so that 320 only prints out once? Also, how can I read the number of rows as well?</p>
  
  <p>Thanks a lot!</p>