<human>:  check if it is a file.
<bot>: Here is a Python function to check if it is a file

import os

def is_file(path, filename):
 """Checks if the filename exists under the path."""
 return os.path.isfile(os.path.join(path, filename))

# Enter the path
path = "/home/dahlia/Desktop/python_code"

# Enter the filename
filename = "test.txt"

# Calling the function
if is_file(path, filename):
 print("File exists")
else:
 print("File does not exist")

#Example Output
# File does not exist

#Remember to inspect code for bugs.