how to skip blank line while reading CSV file using python

后端 未结 8 645
终归单人心
终归单人心 2020-12-03 20:55

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         


        
8条回答
  •  难免孤独
    2020-12-03 21:44

    You can strip leading and trailing whitespace, and if the length is zero after that the line is empty.

提交回复
热议问题