<human>:  check the file existing and delete in.
<bot>: Here is a Python function to check the file exists and delete it

import os

def check_file_exists(fname):
  """Check if a file exists. If it does, delete it."""
  if os.path.exists(fname):
    os.remove(fname)

# Enter the file name
fname = "test.txt"

# Calling the function
print((check_file_exists(fname)))

#Example Output
# None

#Remember to inspect code for bugs.