summaryrefslogtreecommitdiff
path: root/progs/a664.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a664.py')
-rw-r--r--progs/a664.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/progs/a664.py b/progs/a664.py
new file mode 100644
index 0000000..60aa164
--- /dev/null
+++ b/progs/a664.py
@@ -0,0 +1,4 @@
+def dict_depth(d):
+ if isinstance(d, dict):
+ return 1 + (max(map(dict_depth, d.values())) if d else 0)
+ return 0 \ No newline at end of file