write to file python with carriage return code example Example: new line python write to file hs.write(name + "\n")