Hi everyone. I am creating am making a script with arcpro and need some help. The tool will delete a shapefile in my gdb if it matches the name of my input, but if it doesn't find a shapefile in the gdb it will create a shapefile with that name. the tool will online get to the point of using the delete tool, but doesnt show that it is using the create feature class tool. any help would be appreciated.
import arcpy
def CheckFcExists(ws,inFC, outFC):
arcpy.env.workspace = ws
if inFC == inFC:
arcpy.Delete_management(inFC)
arcpy.AddMessage(f"deleting...")
else:
arcpy.CreateFeatureclass_management(inFC,outFC)
arcpy.AddMessage(f"creating...")
workspace = arcpy.GetParameterAsText(0)
inFeatureClass = arcpy.GetParameterAsText(1)
outFeatureClass = arcpy.GetParameterAsText(2)
if __name__ == "__main__":
workspace = r"C:\Users\tophe\Documents\ArcGIS\Projects\Lab3_Programming\Lab3.gdb"
CheckFcExists(workspace, inFeatureClass, outFeatureClass)