1.

What is the use of “a” in file handling?(a) Read(b) Write(c) Append(d) None of the mentionedI have been asked this question during an interview.My query is from Files topic in chapter Regular Expressions and Files of Python

Answer»

Right choice is (c) Append

The EXPLANATION is: This opens the fhe FILE in appending MODE. That means, it will be OPEN for writing and EVERYTHING will be written to the end of the file.

fh =open(“filename_here”, “a”).



Discussion

No Comment Found

Related InterviewSolutions