हिंदी

Write the file mode that will be used for opening the following file. Also, write the Python statement to open the following file: a text file “try.txt” in append and read mode.

Advertisements
Advertisements

प्रश्न

Write the file mode that will be used for opening the following file. Also, write the Python statement to open the following file:

a text file “try.txt” in append and read mode.

एक पंक्ति में उत्तर
Advertisements

उत्तर

“a+”

file_handle = open(“try.txt”, “a+”)

shaalaa.com
Types of Files in Python
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 2: File Handling in Python - Exercise [पृष्ठ ३७]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 12
अध्याय 2 File Handling in Python
Exercise | Q 3. c) | पृष्ठ ३७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×