layer = arcpy.GetParameterAsText(0) apnlist = arcpy.GetParameterAsText(1) mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames (mxd, "LAYERS")[0]
for apn in apnlist: selstring = """TAG = '{0}'""".format(apn) arcpy.SelectLayerByAttribute_management(layer, "NEW_SELECTION", selstring)
Solved! Go to Solution.
inFile = open("C:\sample.txt", "r") inString = inFile.read() # You change the ", " to whatever is delimiting your numbers in the text file / CSV outList = inString.split(", ") # And then you're right, you would do a for loop on the list to isolate each indiviudal number. for number in outList: print number
inFile = open("C:\sample.txt", "r") inString = inFile.read() # You change the ", " to whatever is delimiting your numbers in the text file / CSV outList = inString.split(", ") # And then you're right, you would do a for loop on the list to isolate each indiviudal number. for number in outList: print number