Solved! Go to Solution.
count = 0 while count < lencount: name = uniqueList[count] arcpy.SelectLayerByAttribute_management("layer", "NEW_SELECTION", "Layer = '" + name + "'") # etc., etc. count += 1 print 'done!'
for count in range(lencount): name = uniqueList[count] arcpy.SelectLayerByAttribute_management("layer", "NEW_SELECTION", "Layer = '" + name + "'") # etc., etc. print 'done!'