Without using loops to iterate through a list, is there a preferred syntax for retrieving a value of a given key from all dictionaries in a list?
This is a loop which achieves what I need:
>>> my_list = [{'foo':'bar'},{'foo':'buzz'}]
>>> [x['foo'] for x in my_list]
['bar', 'buzz']
This is intuitively how I think the same result should be achieved:
>>> my_list = [{'foo':'bar'},{'foo':'buzz'}]
>>> [my_list[*]['foo']]
['bar', 'buzz']