How can I achieve the same thing in Python 2? I don't believe dotty_dict works in python 2.7 whereas it will in python 3.
from dotty_dict import dotty
dot = dotty()
alist = ['a.b.c.d.e.f.g.h.i', 'a.b.c.d.e.f.g.h.j', 'a.b.c.d.e.f.g.h.k']
for x in alist:
dot[x] = 'test'
print(dot)
It needs to be python 2.7 due to the project I am working on.
Expected output is a dictionary:
{'a': {'b': {'c': {'d': {'e': {'f': {'g': {'h': {'i': 'test', 'j': 'test', 'k': 'test'}}}}}}}}}