S
Saurabh
arr = ({'x':'1', 'y':'a'}, {'x':'2', 'y':'b'}, {'x':'3', 'y':'c'})
print foo(arr, 'y')
['a','b','c']
I can write the function foo to return ['a','b','c'].
Is there some 'automatic'/built-in way to get this in Python ?
print foo(arr, 'y')
['a','b','c']
I can write the function foo to return ['a','b','c'].
Is there some 'automatic'/built-in way to get this in Python ?