I have a repetitive task here at work. It requires that I make multiple fields NULL as I update the geodatabase. Is there a script I can write that I can input the fields and the feature class. Then make all those fields NULL. This script must not make everything NULL in the feature class, only the fields designated. import arcpy
fc = "N:\Updates\CarsonCityNV\CarsonCityNV.gdb\J_POC_S_Studies_Ln"
with arcpy.da.UpdateCursor(fc, ("C1_GAGE", "C2_DISCH", "C3_MODEL", "C4_FCSTR", "C5_CHANN", "C6_HSTR, "C7_SCOUR", "S1_REGEQ", "S2_REPLO", "S3_IMPAR", "S4_HSTR", "S5_CHIMP", "S6_TOPO", "S7_VEGLU", "S9_HWMS", "S10_REGEQ", "CE_TOTAL", "SE_TOTAL", "A1_TOPO", "A2_HYDRO", "A3_IMPAR", "A4_TECH", "A5_FOAPASS")) as cursor:
for row in cursor:
row[0] = None
row[1] = None
row[2] = None
row[3] = None
row[4] = None
row[5] = None
row[6] = None
row[7] = None
row[8] = None
row[9] = None
row[10] = None
row[11] = None
row[12] = None
row[13] = None
row[14] = None
row[15] = None
row[16] = None
row[17] = None
row[18] = None
row[19] = None
row[20] = None
row[21] = None
row[22] = None
cursor.updateRow(row)
I'm getting a parsing error on line 5.