human
delete file if exist in.
assistant
Here is a Python function to delete a file if there is one

import os

def delete_file(path):
    """
    Delete file if exist in `path`.
    """
    if os.path.exists(path):
        os.remove(path)

# Enter the path
path = "/home/rosey/Desktop/file.txt"

# Calling the function
print((delete_file(path)))

#Example Output
# None

#Remember to inspect code for bugs.