Python truncate method Example

Python truncate method: The truncate() method of IOBase class resizes the stream to the given size in bytes. In other