Can someone help me understand what the last 2 lines of this code does:
import arcpy
arcpy.env.workspace = "c:/esripress/python/data/exercise07"
arcpy.env.overwriteOutput = True
copy = arcpy.CopyFeatures_management("airports.shp","Results/airports.shp")
fc = "Results/airports.shp"
cursor = arcpy.da.UpdateCursor(fc, ["STATE"], ' "STATE" <> \'AK\'')
for row in cursor:
row[0] = "AK"
cursor.updateRow(row)
del row
del cursor
I understand that the loop function goes through each record that does not have a value of 'AK' and gives that record a value of "AK". But what I don't understand is what the del row and del cursor are meant to do.
Statevalue of any airport that was not previously in Alaska