Python Dict-List
Collapse
X
-
Code:dict = {'Alice': ["2","bookclub",],'Jane': ["3","mat club"]} for x,y in enumerate(dict): # x is the dict key # y is the list for item in dict[y]:#dict[y] is lookup the item with the dict key print(y,item)Leave a comment:
-
-
Python Dict-List
If you have a dict with a list how do you get the info from the list.
Leave a comment: