Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
lambda func solution in Clear category for Tree Walker by brispol19
tree_walker = lambda tree, target: tree != target and isinstance(list(tree.values()) if isinstance(tree, dict) else tree, list) and sum(tree_walker(n, target) for n in (list(tree.values()) if isinstance(tree, dict) else tree)) or tree == target
Jan. 22, 2020
Comments: