dictionary of lists of dictionaries in python
- by Andy
I'm a perl scripter working in python and need to know a way to do the following perl in python.
$Hash{$key1}[$index_value]{$key2} = $value;
I have seen the stackoverflow question here: List of dictionaries, in a dictionary - in Python
I still don't understand what self.rules is doing or if it works for my solution.
My data will be coming from files, and will I will be using regexes to capture to temporary variables until ready to store in the data structure. If you need to ask, the order related to the $index_value is important and would like to be maintained as an integer.
Any suggestions are appreciated or if you think I need to rethink data structures with Python that would be helpful.