Attempting to make the following code work in ArcMap:
for i in range(len(l)):
print("calculating area" + str(i))
in_layer = l[i]
exp = "!SHAPE.AREA@ACRES!"
arcpy.CalculateField_management(in_layer, "Area_Field", exp, "PYTHON 9.3")
print("next layer" + str(i+1))
Getting the following error:
Trying to follow the first answer in the link here Calculate area within Python script in ArcMap, for reference.
Is the expression wrong, or is there a different error in the code?
I am using ArcMap 10.5.1.
