I have a set of dictionaries with keys and values i need all the values as a separate dictionary
print(i)
O/P:
{'type':a,total:3}
{'type':b,total:2}
{'type':c,total:5}
{'type':d,total:6}
But now the required Output should like this…
{'a':3}
{'b':2}
{'c':5}
{'d':6}
2
Answers
You can use something like this:
Given the following input:
You can try using a list comprehension like this:
Output: