Suppose I have the following list:
list = [{'a': 1, 'b': 2}, {'c': 3, 'd': 4}, {'e': 5, 'f': 6}]
How do I access a particular value of key say d?
Suppose I have the following list:
list = [{'a': 1, 'b': 2}, {'c': 3, 'd': 4}, {'e': 5, 'f': 6}]
How do I access a particular value of key say d?
To get all the values from a list of dictionaries, use the following code :
list = [{'text': 1, 'b': 2}, {'text': 3, 'd': 4}, {'text': 5, 'f': 6}]
subtitle=[]
for value in list:
subtitle.append(value['text'])