I'm fairly new to python, so I'm having a little trouble with this. I want to iterate through a list of values, select the list values from a feature class, select from another feature class that intersects the first selection, and then calculate a field in the second selection based of the list index value. Here's the script I'm working on:
import arcpy
arcpy.env.workspace = r"C:workspace.gdb"
circuits = ["DC430", "DC431", "DC432"]
for i in range(len(circuits)):
arcpy.SelectLayerByAttribute_management("Meters", "NEW_SELECTION", circuits[i])
arcpy.SelectLayerByLocation_management("Parcels", "INTERSECT", "Meters", "", "NEW_SELECTION", "NOT_INVERT")
arcpy.CalculateField_management("Parcels", "Circuit", "circuits[i]", "PYTHON_9.3", "")
How do I make this work the right way?