DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
remove empty lines from file python
with open("new_file","r") as f: for i in f.readlines(): if not i.strip(): continue if i: print i,
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#remove
#empty
#lines
#file
#python
ADD COMMENT
Topic
COMMENT
Name
8+3 =
Submit