os.truncate(path, length)
Truncate the file corresponding to path, so that it is at most length bytes in size.
This function can support specifying a file descriptor.
Availability: Unix, Windows.
New in version 3.3.
Changed in version 3.5: Added support for Windows
Please login to continue.