write to file python 1 line' code example Example: new line python write to file hs.write(name + "\n")