Hi All,
I am trying to compare the fields of two layers and delete any that are different. This is the code that I thought would work, but it returns RuntimeError: Object: Error in executing tool. Any ideas?
import arcpy
List = arcpy.ListFields("Layer 1")
x = arcpy.ListFields("Layer 2")
for i in x:
if i in List:
print i
else:
arcpy.DeleteField_management("Layer 2", I)