Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> import arcpy
- ... fc = "Flight_Demo5_LineToPoints"
- ... n = 1
- ... with arcpy.da.UpdateCursor(fc, "alternate") as cursor:
- ... for row in cursor:
- ... if n == 1:
- ... row[0] = 1
- ... n = n - 1
- ... else:
- ... row[0] = 0
- ... n = n + 1
- ... cursor.updateRow(row)
Advertisement
RAW Paste Data
Copied
Advertisement