Computer Science

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.

Python Data Handling

1 Like

Answer

(a) To open a file named "RESULT.DAT" for output:
file = open("RESULT.DAT")

(b) To go to the end of the file at any time:
file.seek(0, 2)

Answered By

2 Likes


Related Questions