python 'dict_values' object is not subscriptable code example
Example 1: python 'dict_keys' object is not subscriptable
vocab = list(fdist1.keys())
Example 2: 'dict_values' object is not subscriptable
a = {"a":"Chocolate","b":"Strawberry"}
print(list(a.keys())[0])
print(list(a.values())[0])
print(list(a.items())[0])