
Tishka17
23.07.2019
07:16:45
d={'k':1, 'v':{'w':{'x':2}}}
def php(d, wrap=False):
for k,v in d.items():
if wrap:
k=f'[{k}]'
if isinstance(v, dict):
for k2,v2 in php(v, True):
yield k+k2, v2
else:
yield k, v
print(dict(php(d)))

elessar
23.07.2019
07:40:28
есть csv
"171760","7172","1","94526","473000","26(78)","","1650414"
"340788","7172","1","94526","473000","31(61)","","1650414"
"787920","7172","1","94526","473000","14","","1659645"
"797215","7172","1","94526","473000","1(1/1)","","1650414"
"820277","7172","1","21993","010000","57/2(77)","","1654816"
"1071777","7172","1","94526","473000","23","","1657750"
"1274032","7172","1","21992","010000","5","","98866"
"1306709","7172","1","21992","010000","55(21/1)","","1650380"
"10733210","7142","7642","26224","110012","18 ИП "Че","ховкий"","725704"
"23202262","7172","1","36077","010000","8"","","1660628"