Empty strings are equivalent to <code>False</code> in python.  Since you're already doing <code>strip()</code> you can easily skip blank lines by just using a <code>if line:<code> conditional.  Simple and easier to read.