Deleting File Operation in Python

0 Comments

To delete a file, you must import the OS module, and using os.remove() function we can perform deletion.

import os

os.remove(“abc.txt”)

Thank you for reading. I hope that you enjoyed the article


Leave a Reply

Your email address will not be published. Required fields are marked *