write a string `my string` to a file `file` including new line character,file.write('My String\n')