Hi Christi,Are you familiar with dictionaries? This would be a great way to generate a list for each variable that could be called by using the parcel ID. I included an example of how to create a dictionary with all 3 attributes you wanted. These attributes can be accessed by the unique parcel ID which would serve as the key for the dictionary. The example I showed at the bottom demonstrates how to print "Parcel ID: address, city"For example, it would show something like this:0360-15-16-200-002-0: 101 Main St, SpringfieldThe advantage of using a dictionary like this is that you can keep all these items grouped together by parcel ID. If you wanted to add these fields to another table, you could do so easily if the second table has the common Parcel ID field without even needing to join the tables. You could simply use an update cursor with this dictionary.
#import modules and define workspace
import arcpy
import os
import traceback
workspace = arcpy.env.workspace = "E:/dev/Christi/PSL/"
arcpy.env.overwriteOutput = True
#Define map document
mxDoc = arcpy.mapping.MapDocument("CURRENT")
#List the first dataframe (named Layers) in the map document
df = arcpy.mapping.ListDataFrames(mxDoc, "Layers") [0]
#List first map layer (which is the parcels layer) in dataframe
parcelLayer = arcpy.mapping.ListLayers(mxDoc,"",df) [0]
#Select parcel layer by attribute and clear any previously selected features
#Set up a Search Cursor to go thru the attribute table and get row values
#Set up variable, then read the row values for 'APN_NU_1' field and populate the list
arcpy.SelectLayerByAttribute_management(parcelLayer,"CLEAR_SELECTION")
info_dict = {}
rows = arcpy.SearchCursor(parcelLayer)
for row in rows:
info_dict[row.Parcel_ID] = [row.APN_NU_1,row.ADDR_B,row.CITY]
del row,rows
# If you want to access a single field you can reference it with a list index
# example: if you want the address B for a certain parcel you can print something
# like this: print info_dict[row.Parcel_ID][1]
# the [1] indexes item 1 (value) in your list for each dictionary key (parcel ID)
# So to print each address, city for each Parcel ID:
for key,value in info_dict_iteritems():
print '%s:\t%s, %s' %(key,value[1],value[2])