1What is the output of the following code?import io f = io.StringIO('a\nb\nc\n') print(len(f.readlines()))AErrorB1C6D3View AnswerDiscussWorkspaceReportSaveEasy
2Which method writes a list of strings to a file without adding newlines?Awrite()Bwriteline()Cappend()Dwritelines()View AnswerDiscussWorkspaceReportSaveEasy
3Which mode opens a file for writing and creates it (erasing old contents if it exists)?A'r'B'a'C'w'D'x'View AnswerDiscussWorkspaceReportSaveEasy
4Which module serialises Python objects to bytes and back?AmathBpickleCstringDcsvView AnswerDiscussWorkspaceReportSaveMedium
5What is the output of the following code?import io f = io.StringIO('abc') print(f.read(2), f.read())Aa bcBabc Cab abcDab cView AnswerDiscussWorkspaceReportSaveMedium