If you are happy to assume the structure is the same all the way through, this has a natural recursive solution:
def layers(data):
try:
keys = [data.keys()]
except ValueError:
return
rest = layers(next(iter(data.values())))
return keys + rest if rest else keys
Or in 3.x:
from collections.abc import Mapping
def layers(data):
if isinstance(data, Mapping):
yield data.keys()
yield from layers(next(data.values()))
The advantage to this solution is that it doesn't rely on you knowing the number of layers.
[{'9','10','11'}, {'Dual', 'Top', 'Bottom'}, {'spectrum', 'interferogram', 'SNR'}]