File opening

The open function to open the file is "test.txt" .

The file is in the same directory as the append mode:

text_file = open("test.txt","a")

If the file is not in the same directory, we have to define the path in the append mode:

text_file = open("/home/…../test.txt","a")
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset