AnsweredAssumed Answered

Pull one attribute from a featureclass

Question asked by qvt2_pdxedu on Jan 22, 2020
Latest reply on Jan 23, 2020 by Dan_Patterson

I am a beginner, and the following question will show why. 

 

I am trying to extract one value from a layer that has only one feature in it, but the only way I know how to do it takes three lines of code. There must be a better way, right? See the below code that I am using, and excuse the ignorance. 

 

# pull some attributes from the isolated feature
with arcpy.da.SearchCursor(fcTemp, 'ATTR') as pulllist:
    for pull in pulllist:
        var = pull[0]

Outcomes