Python Programming - Reading and Writing Files - Discussion

Discussion Forum : Reading and Writing Files - General Questions (Q.No. 19)
19.
What is the purpose of the truncate() method when working with files?
To remove all contents of the file
To shorten the file name
To create a new file
To split the file into multiple parts
Answer: Option
Explanation:
The truncate() method is used to remove all contents of the file from the current position.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.