SyntaxFix
Write A Post
Hire A Developer
Questions
I use the following code to test the empty line with or without white spaces.
if len(line.strip()) == 0 : # do something with empty line