如何将a转换list为嵌套的`词典'?
list
例如:
l = [1, 2, 3, 4]
我想将它转换为如下所示的字典:
{1: {2: {3: {4: {}}}}}
python dictionary list python-3.x
dictionary ×1
list ×1
python ×1
python-3.x ×1