python write to file add new line at end code example Example: new line python write to file hs.write(name + "\n")