def truncate_file(filename):
    open(filename, 'w').close()  # opening as 'w' overwrites the file
Truncate a file (empty it).
dataset/ETHPy150Open circus-tent/circus/circus/tests/support.py/truncate_file