I am writing some python code (to work in conjuction with ArcGIS), and I have a simple statement that runs fine and does exactly what I am asking it to do, I just get a 'warning' from my scripting software (PyCharm) telling me:
- Local variable 'row' value is not used
- This inspection highlights local variables, parameters or local functions unused in scope.
I understand it is not used, because it is not needed. This is the only way (that I know of personally) to work out how many rows exist in a table.
Can someone tell me if there is a better (more correct) way of writing this??
cursor = arcpy.SearchCursor(my_table)
for row in cursor:
count += 1
print count
Cheers