I have some rows that i would like to remove if they start with certain letters. I have the following code but i have to run it twice in order for it to remove certain rows, i am not sure why? I want to be able to remove rows that have the following in them "Xit",UPRR""Inpr Mp", "Impr Rxr", "I 84". How can i do this?
#delete all attributes/Rows that start with Xit, UPRR,Inpr Mp, Impr Rxr, I 84
with arcpy.da.UpdateCursor(lyr, 'STREET') as cursor:
for row in cursor:
if row.startswith("Xit"): #"UPRR","Inpr Mp", "Impr, "Rxr", "I 84"