HF RL Explorer

Task: Delete Only the Content of a File in Python

Task: Delete Only the Content of a File in Python: a task in Terminal-Lego-15k (Harbor dataset). You need to implement a Python function that clears the content of an open file object without deleting the file from disk. This is useful when you want to reuse temporary files across multiple…

The task

You need to implement a Python function that clears the content of an open file object without deleting the file from disk. This is useful when you want to reuse temporary files across multiple iterations of a process.

Part of PrimeIntellect/Terminal-Lego-15k.