title: How can I delete/strip the white/blank rows in my csv file using Python?
body: <p>I had a csv file with information that had to be removed from it (did it by eliminating the corresponding columns) and the output I'm getting is what I expected except that is also giving me blank rows between each line. How can I get rid of those? (I currently don't have pandas, so it would be great if there's a solution to this without having to use it)</p>
  
  <p>For example, I want to go from:</p>
  
  <pre><code>ssid vlan CT rssi date
  
  
  #    #    #   #    #
  
  
  #    #    #   #    #
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>ssid vlan CT rssi date
  #    #    #  #    # 
  #    #    #  #    #
  </code></pre>
  
  <p>Here is the script I used to delete the columns I didn't want and also what is giving me those extra rows: </p>
  
  <pre><code>import csv
  
  with open("SBU.csv","r") as source:
      rdr= csv.reader(source)
  
      with open("scrubbed.csv","w") as result:
          wtr= csv.writer(result)
  
          for r in rdr:
              wtr.writerow((r[0], r[1], r[3], r[5], r[6], r[7], r[8]))  
  
  </code></pre>