Python File IO MCQs

Question 6: The rollback() method should be executed to ________.

Question 1: Which of the following modes are valid for opening a file to read and write?

Question 2: which of the following built-in function is used to get the file object for a particular file?

Question 3: What does the following statement do?

f = open("C:\MyFile.txt", '+') 

Question 4: What does the following code do?

f = open('C:\myfile.txt') 
c = f.read()