Q. Write appropriate statements to do the following:
(a) To open a file named "RESULT.DAT" for output.
(b) To go to the end of the file at any time.
Answer =
(a) file = open("RESULT.dat", "r")
(b) f1 = open("DIARY.TXT ",'r')
data = f1.readlines()
print(data[-1])
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )