Solved! Go to Solution.
>>> fcNames = {}
>>> type(fcNames)
<type 'dict'>
>>>
>>> fcNames['fc1'] = 3
>>> print fcNames
{'fc1': 3}
>>>
>>> fcNames['fc1']
3
>>>
>>> fcNames['fc2'] = 10
>>>
>>> fcNames
{'fc1': 3, 'fc2': 10}
>>>
>>> for i in range(10):
i = fcNames['fc1']
i += 1
fcNames['fc1'] = i
>>> fcNames['fc1']
13
>>> fcNames
{'fc1': 13, 'fc2': 10}
>>>
for i in range(10): fcNames['fc1'] += 1
masterlist = "CoreTestLocation,CoverToReo,Defect_Areas"
dcount = {'CoreTestLocation': 0, 'CoverToReo': 0, 'Defect_Areas': 0,}fcrecs = int(arcpy.GetCount_management(fc).getOutput(0))
if string.find(masterlist,fc) != -1: [INDENT]print fc + " has " + str(fcrecs) + " features" currentval = dcount[fc] newval = currentval + fcrecs dcount[fc] = newval [/INDENT]
masterlist = masterlist.split(',')if fc in masterlist:
print('{0} has {1} features'.format(fc, fcrecs))
dcount[fc] += fcrecs