And keep newline="" on that open() call if you're using the csv module.