=== 追記 ===
自分でやってみて、こんな風に書けば4階層までは希望通り動いたのですが・・・あまりにもかっこ悪いのでどうにかしたいと思っています。
after_dict={}
for key,val in before_dict.items():
key2 = key.split('--')
if len(key2)==1:
after_dict[key2[0]] = val
elif len(key2)==2:
if(after_dict.get(key2[0])==None):
after_dict[key2[0]] = {}
after_dict[key2[0]][key2[1]] = val
elif len(key2)==3:
if(after_dict.get(key2[0])==None):
after_dict[key2[0]] = {}
after_dict[key2[0]][key2[1]] = {}
if(after_dict.get(key2[0]).get(key2[1])==None):
after_dict[key2[0]][key2[1]] = {}
after_dict[key2[0]][key2[1]][key2[2]] = val
elif len(key2)==4:
if(after_dict.get(key2[0])==None):
after_dict[key2[0]] = {}
after_dict[key2[0]][key2[1]] = {}
after_dict[key2[0]][key2[1]][key2[2]] = {}
if(after_dict.get(key2[0]).get(key2[1])==None):
after_dict[key2[0]][key2[1]] = {}
after_dict[key2[0]][key2[1]][key2[2]] = {}
if(after_dict.get(key2[0]).get(key2[1]).get(key2[2])==None):
after_dict[key2[0]][key2[1]][key2[2]] = {}
after_dict[key2[0]][key2[1]][key2[2]][key2[3]] = val