This is a conceptual problem, I need to instantiate a number of 'nodes' for a network simulation. The naming is the problem - I need a method to autogenerate names for the instances (any method that allows me to track and reference the nodes after creation will do)
to give a better idea of what I need, here's what most of the loop would look like with hashtags shoehorned into where the problem is. x and y will be defined in the parent function.
for n in range(1000):
#n, but somehow converted into the name of the dict# = {
'address':n,
'resistance':x,
'special':[],
'parent':y,
'children':[],
'adjnodes':[]
}
Apologies for being a noob. I've searched high and low for the answer to this so if it's obvious then I'm misusing the lingo or something; in that case please let me know what lingo to use and I'll grab my hat and be on my way. Not being sarcastic, just prefer to be taught harshly when necessary. Thanks.