6What does f.seek(0) do?ADeletes the fileBMoves the file position to the beginningCReads one byteDCloses the fileView AnswerDiscussWorkspaceReportSaveEasy
7Which mode opens a file for writing and creates it (erasing old contents if it exists)?A'w'B'a'C'r'D'x'View AnswerDiscussWorkspaceReportSaveEasy
8What does the 'b' in mode 'rb' mean?ABufferedBBinary modeCBackupDBegin at startView AnswerDiscussWorkspaceReportSaveEasy
9What is the output of the following code?import io f = io.StringIO('abc') print(f.read(2), f.read())Aa bcBab cCabc Dab abcView AnswerDiscussWorkspaceReportSaveMedium
10Which mode creates a file and fails if it already exists?A'x'B'w'C'r+'D'a'View AnswerDiscussWorkspaceReportSaveEasy