A bag holds things (strings) and smaller bags (lists), and bags can hold bags. Write find_keys(bag): how deep are the "keys"? Right in this bag is level 1, inside a bag in it is level 2, and so on. If they aren't there, return None. There's only one set of keys.
find_keys(["wallet", ["phone", "keys"]])→2find_keys(["keys", "gum"])→1def find_keys(bag):
if "keys" in bag:
return 1
for thing in bag:
if isinstance(thing, list):
# your code here: look in this smaller bag; if found, add 1 to the level and return it
pass
return None
Run tries the examples. When they look right, Submit.