- 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 Python program that removes
# File to be removed
If the file path /ex/marked1.txt is not available then the output will be
|Given file path not found|