i have a dictionary that includes keys as string and values as list. My question is how to return the selected keys and values using for loop?
can i save the returned result in a variable in order to print later ?
dicts = {"location":["loc1","loc2","loc3"],"category":["cat1","cat2","cat3"]}
i tried these lines:
keys = sidebars.keys()
values = sidebars.values()
print("keys",keys)
print("values",values)
I want to return that the selected key has as values the following items.
{key1:[value1,value2],key2:[value1,value2]}