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