Safely indexing dictionary tree

后端 未结 0 1145
生来不讨喜
生来不讨喜 2021-01-19 14:28

The below code just works fine for my simple case, but is there any generic and pythonic way?

def safe_get(d, *args):
    n = len(args)
    if n == 1:
                


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题