This is my code i am able to print each line but when blank line appears it prints ; because of CSV file format, so i want to skip when blank line appears
im
This example just prints the data in array form while skipping the empty lines:
import csv file = open("data.csv", "r") data = csv.reader(file) for line in data: if line: print line file.close()
I find it much clearer than the other provided examples.