[python] python: how to check if a line is an empty line