HF RL Explorer

Task: Delete All .bak Files in a Directory with Python

Task: Delete All .bak Files in a Directory with Python: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that deletes all files with the .bak extension in a specified directory. The script should only delete files with the .bak extension and leave all other files untouched.

The task

Write a Python script that deletes all files with the `.bak` extension in a specified directory. The script should only delete files with the `.bak` extension and leave all other files untouched.

Part of PrimeIntellect/Terminal-Lego-15k.