python-benedict/benedict/core/find.py

6 lines
133 B
Python
Raw Permalink Normal View History

2020-08-27 13:13:18 +00:00
def find(d, keys, default=None):
for key in keys:
if key in d:
return d.get(key, default)
return default