Lew
unread,Oct 31, 2012, 2:49:53 PM10/31/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Python - ARCGIS geoprocessing
Hi Pythoneers,
I used the code below to make a list of values in an attribute. It
created what I think is a unicoded list, as below. When I attempt to
strip the "u" prefix from the list, the line -- print item --
prints the item without the 'u' prefix, but newList keeps it
fireNumList = set([row.getValue(fldName) for row in
arcpy.SearchCursor(outFeatures3)])
newList = []
for item in fireNumList:
#newName = item.strip('u')
newList.append(item.strip('u'))
print item
print newList
[u'R20133', u'N50296', u'G90403', u'G90249', u'K20972', u'N20626',
u'G90245', u'G70061', u'G90240', u'G90369', u'K60589', u'C20210']
Thanks for you help!
Lew.