how to write to a new line in a text file python code example Example: new line python write to file hs.write(name + "\n")