Overview:
- The remove() function removes a file, as specified by a given file path. The function does not work, if the file path denotes a directory.
Example:
# Example Python program that removes # File to be removed try: |
Output:
Removed: /ex/marked1.txt |
If the file path /ex/marked1.txt is not available then the output will be
Given file path not found |