A very simplified view of the file object is provided in Figure 6.
图6提供了文件对象的简化视图。
To write data to a file, you have to first create the file object.
要把数据写入文件,必须先创建 file 对象。
Now, notice the last line in Listing 1, which calls a close method on the file object.
现在,请注意清单1中的最后一行,它调用file对象的close方法。
应用推荐