gabrisch

name a list with a record in a cursor...

Discussion created by gabrisch on Mar 27, 2014
Latest reply on Mar 28, 2014 by FLBB
I want to step through some data in a search cursor and create a new list with a name based off one of the attributes.
The code below will return  SyntaxError: can't assign to function call.  Any ideas how to do this?

infc = mydata
cursor = arcpy.SearchCursor(infc)
    for row in cursor:
        row.getValue("Name") = []


Same thing happens when I try to convert the result to a string.
infc = mydata
cursor = arcpy.SearchCursor(infc)
    for row in cursor:
        str(row.getValue("Name")) = []

Outcomes