Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| Windows Registry Editor Version 5.00 | |
| [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\SESSION_NAME] | |
| ; Default Foreground | |
| "Colour0"="217,216,216" | |
| ; Default Bold Foreground | |
| "Colour1"="217,216,216" | |
| ; Default Background | |
| "Colour2"="28,28,28" |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!