Skip to content Skip to sidebar Skip to footer

How Can I Insert Alternate Blank Lines Into A Table With Python?

I have a simple (but huge) CSV table, and I need to insert a free (=blank) line/row after each line/row of this table. To explain it in another way, I want every second line of my

Solution 1:

How about:

  for row in readie:
     outwriter.writerow(row)
     outwriter.writerow([])

Seems to do what you want.

Post a Comment for "How Can I Insert Alternate Blank Lines Into A Table With Python?"