import omegaconf # create an OmegaConf dictionary conf = omegaconf.DictConfig({"fruits": ["apple", "banana", "orange"], "vegetables": {"leafy": ["kale", "spinach"], "root": ["carrot", "beet"]}}) # check if the fruits key is a list is_fruit_list = omegaconf.is_list(conf.fruits) print(is_fruit_list) # True # check if the vegetables key is a list is_veg_list = omegaconf.is_list(conf.vegetables) print(is_veg_list) # False # check if the leafy vegetables key is a list is_leafy_veg_list = omegaconf.is_list(conf.vegetables.leafy) print(is_leafy_veg_list) # TrueThe library used in this example is OmegaConf.