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?
List = arcpy.ListFields("Layer 1")
x = arcpy.ListFields("Layer 2")
for i in x:
if i in List:
arcpy.DeleteField_management("Layer 2", I)