What is the use of “w” in file handling?
(a) Read
(b) Write
(c) Append
(d) None of the mentioned
(a) Read
(b) Write
(c) Append
(d) None of the mentioned
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Right choice is (b) Write
The best I can explain: This opens the file for writing. It will create the file if it doesn’t exist, and if it does, it will overwrite it.
fh = open(“filename_here”, “w”).