![]() ![]() The output from reading the file may not be as expected. The read() method reads and returns data from the file object until EOF.We use the open() method and we supply the file name (file1.txt) and the mode which is “r” in this case.We can read the lines from this new file we just wrote to: f = open("file1.txt", "r") When the above code executes there will be a new file on the filesystem. The file can now be found on the local storage of the OS in the same folder as your python script. Once the file is closed no further operations are possible. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |