Extracting Data from the following List

36 views Asked by At

I have a list of the following format

list=[OrderedDict([('Component', 'AAAA')]), OrderedDict([('Component', 'BBBB')])]

How do extract the values 'AAAA' and 'BBBB' to make them into a new list?

1

There are 1 answers

0
FrainBr33z3 On

Try: [i['Component'] for i in list]