¡@

Home 

python Programming Glossary: bypath

Count non-empty end-leafs of a python dicitonary/array data structure - recursive algorithm?

http://stackoverflow.com/questions/18069262/count-non-empty-end-leafs-of-a-python-dicitonary-array-data-structure-recursiv

Maybe this can guide you in the right direction. byPath collects the nested dictionary items. Once called you can basically.. elem '' or not elem or whatever x #your x as posted def byPath tree path try head tail path.split '.' 1 except return tree.. '.' 1 except return tree path if head 'XX' return byPath node tail for node in tree else return byPath tree head tail..