Prefer the writelines method.