![]() ![]() Open a text file for updating (both reading & writing). If the file exists, the function append contents at the end of the file. If the file doesn’t exist, the function creates a new file. If the file exists, the function will truncate all the contents as soon as you open it. The mode parameter specifies the mode for which you want to open the text file.įor writing to a text file, you use one of the following modes: Mode.The file parameter specifies the path to the text file that you want to open for writing.The open() function accepts many parameters. ![]() The following shows the basic syntax of the open() function: f = open(file, mode)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |