Question: ```
my_dict = {"fruits": ["apple", "orange", "grape", "maracuya", "pineapple"],
           "countries": [["India", "China", "Brazil", "Lesotho", "Nepal"], 
                         ["Spain", "Italy", "Japan", "Indonesia", "Russia"], 
                         ["Germany", "Austria", "Paraguay", "New Zealand", "Peru"],
                         ["Australia", "Colombia", "Belice", "Swaziland"]],
           "colors": [["blue", "black", "green", "yellow", "red"],
                      ["purple", "pink", "white", "lila"]]}

```

Is there a way to know how many lists I have under each key? for example: under the key "fruits" I just have one, under "countries" I have 4

what I've tried it was mostly:

```
for key, values in my_dict.items():
    print(len(values))

```

which didn't work

```
for key in my_dict.values():
   print(len(key))

```

also failed

Answer: 
One approach, although it doesn't feel very pythonic, is to just loop through the values and, if a value is a list, test each item in the list to see whether *it* is a list, keeping count of the ones that are:

```
for key, value in my_dict.items():
    count = 0
    if isinstance(value, list):
        for val in value:
            if isinstance(val, list):
                count += 1
        print(f'{key} has {count} lists')

```

Prints:

```none
fruits has 0 list
countries has 4 lists
colors has 2 lists

```
Thanks a lot codingpoets, your answer was the most suitable one

Thanks also to all the rest of the people who read my problem and tried to help :-)