I have a searchCursor that goes through a specific column in a table. On every row I need to compare the value from this row with the value on the next row and if they are equal do something and if they aren't equal do something else.
mxd = arcpy.mapping.MapDocument("CURRENT") table = arcpy.mapping.ListTableViews(mxd) column = "name" cursor=arcpy.SearchCursor(table) for row in cursor: print(row.getValue(column))
I have this sample of code. It goes through all rows. But how can I compare the value from row[row] with the value from row[row+1]??
Thanks for any help.