You can iteratively build/access levels using setdefault
in a loop:
d = {}
d2 = d
for k in key_lst[:-1]:
d2 = d2.setdefault(k, {})
d2[key_lst[-1]] = value
print(d)
# {'key1': {'key2': {'key3': 'my_value'}}}
d
is the reference to your dictionary, and d2
is a throw-away reference that accesses inner levels at each iteration.