python find end of file and write in next line code example Example: new line python write to file hs.write(name + "\n")