It sounds like you're trying to create these as a bunch of separate variables, and then store the name of the variable in the address
field of each one.
Don't do that. See Keep data out of your variable names and Why you don't want to dynamically create variables for an explanation as to why. But the short version is that trying to do so is the only reason you're having a problem in the first place.
Why not just create a single list
of all of the nodes? Then your address
can just be an index into that list. For example:
nodes = []
for n in range(1000):
nodes.append({
'address':n,
'resistance':x,
'special':[],
'parent':y,
'children':[],
'adjnodes':[]
})
Or, if you plan to be adding and removing nodes as you go along, so list indices won't stay consistent, just use a dict
:
nodes = {}
for n in range(1000):
nodes[n] = {
'address':n,
'resistance':x,
'special':[],
'parent':y,
'children':[],
'adjnodes':[]
}