You can do it without even defining a class:
from collections import defaultdict
nested_dict = lambda: defaultdict(nested_dict)
nest = nested_dict()
nest[0][1][2][3][4][5] = 6
More Related Contents:
- Remove string in python dictionary value
- python building coder for ceasar cipher
- I don’t know how to display step 3 for this assignment
- Python 2.7.10: Using LAMBDA and LOGICAL operators in DICT to choose a case
- How to make a dict from n’th indices of tuples in list
- Access a particular field in arbitrarily nested JSON data [duplicate]
- How to use a dot “.” to access members of dictionary?
- Alternative to dict comprehension prior to Python 2.7
- How can I convert a dictionary into a list of tuples?
- Why doesn’t a python dict.update() return the object?
- merging Python dictionaries
- Output pyodbc cursor results as python dictionary
- Accessing dict_keys element by index in Python3
- How to concatenate two dictionaries to create a new one? [duplicate]
- How to search if dictionary value contains certain string with Python
- Is it possible to assign the same value to multiple keys in a dict object at once?
- Creating an Ordered Counter
- How do I sort this list in Python, if my date is in a String?
- How can I extract all values from a dictionary in Python?
- Will OrderedDict become redundant in Python 3.7?
- Search a list of dictionaries in Python
- Nested Dictionary to MultiIndex pandas DataFrame (3 level)
- Accessing values nested within dictionaries
- How do I send list of dictionary as Body parameter in FastAPI?
- Is the order of a Python dictionary guaranteed over iterations?
- Know the depth of a dictionary
- How to extract all values from a dictionary in Python?
- How can I make a list of dictionaries according to the Cartesian product of values in a source dictionary (“explode” the dictionary)?
- Determine whether a key is present in a dictionary [duplicate]
- Comparing 2 lists consisting of dictionaries with unique keys in python