valueList = list(i[0] for i in arcpy.da.SearchCursor(fc, ['FIELDNAME',]))
HI, I wanna list number in the column of OBJECTID_1, see the picture. I wrote it like this :for row in arcpy.SearchCursor(fc): print"%f" %row.getValue("OBJECTID_1")what is wrong? Thanks[ATTACH=CONFIG]23892[/ATTACH]
cur = arcpy.da.SearchCursor(fc, ['FIELDNAME',]) for i in cur: print i[0]
Did you want to create a list containing the values of that column? valueList = list(i[0] for i in arcpy.da.SearchCursor(fc, ['FIELDNAME',]))
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.